您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
help at regex challenge site
当前为
// ==UserScript== // @name Regex // @namespace http://wifi.com // @include http://callumacrae.github.io/regex-tuesday/ // @version 1.3 // @description help at regex challenge site // @grant none // ==/UserScript== var script_link = 'https://greasyfork.org/scripts/14214-regex/code/Regex.user.js'; var elArray = document.getElementsByClassName("challenge"); var done = ["http://callumacrae.github.io/regex-tuesday/challenge1.html", "http://callumacrae.github.io/regex-tuesday/challenge20.html", "http://callumacrae.github.io/regex-tuesday/challenge2.html", "http://callumacrae.github.io/regex-tuesday/challenge3.html", "http://callumacrae.github.io/regex-tuesday/challenge4.html", "http://callumacrae.github.io/regex-tuesday/challenge5.html", "http://callumacrae.github.io/regex-tuesday/challenge6.html", "http://callumacrae.github.io/regex-tuesday/challenge7.html", "http://callumacrae.github.io/regex-tuesday/challenge8.html", "http://callumacrae.github.io/regex-tuesday/challenge9.html"]; //alert(elArray[0].parentElement.parentElement.parentElement.innerHTML); var counter = elArray.length; for(i = 0; i< elArray.length; i++){ //alert(elArray[i].href); if(contains(elArray[i].href, done)){ elArray[i].style.backgroundColor = "limegreen"; counter--; } } if(counter != elArray.length) elArray[0].parentElement.parentElement.parentElement.innerHTML = "<h2 style='background-color:red'>Still " + counter + " challenges left</h2>" + elArray[0].parentElement.parentElement.parentElement.innerHTML; else elArray[0].parentElement.parentElement.parentElement.innerHTML = "<h2 style='background-color:limegreen'>Still " + counter + " challenges left</h2>" + elArray[0].parentElement.parentElement.parentElement.innerHTML; function contains(myValue, myArray) { var count=myArray.length; for(var i=0;i<count;i++) { if(myArray[i]===myValue){return true;} } return false; } function updateCheck(forced) { if ((forced) || (parseInt(GM_getValue('SUC_last_update', '0')) + 86400000 <= (new Date().getTime()))) // Checks once a day (24 h * 60 m * 60 s * 1000 ms) { try { GM_xmlhttpRequest( { method: 'GET', url: script_link, headers: {'Cache-Control': 'no-cache'}, onload: function(resp) { var local_version, remote_version, rt, script_name; rt=resp.responseText; GM_setValue('SUC_last_update', new Date().getTime()+''); var re = /@version\s*(.*?)\s/m; remote_version=parseFloat(re.exec(rt)[1]); local_version=parseFloat(GM_getValue('SUC_current_version', '-1')); if(local_version!=-1) { script_name = (/@name\s*(.*?)\s*$/m.exec(rt))[1]; GM_setValue('SUC_target_script_name', script_name); if (remote_version > local_version) { if(confirm('There is an update available for the Greasemonkey script "'+script_name+'."\nWould you like to go to the install page now?')) { GM_openInTab(script_link); GM_setValue('SUC_current_version', remote_version); } } } else GM_setValue('SUC_current_version', remote_version+''); } }); } catch (err) { if (true) alert('An error occurred while checking for updates:\n'+err); } } } updateCheck();