您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
help at regex challenge site
当前为
// ==UserScript== // @name Regex // @namespace http://wifi.com // @include http://callumacrae.github.io/regex-tuesday/ // @version 1.1 // @description help at regex challenge site // @grant none // ==/UserScript== 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; }