Add bitbucket dotjs script
This commit is contained in:
parent
8e42ead28d
commit
e6888dc746
1 changed files with 23 additions and 0 deletions
23
config/dotjs/bitbucket.org.js
Normal file
23
config/dotjs/bitbucket.org.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
((() => {
|
||||
const domLoaded = function domLoaded(){
|
||||
document.removeEventListener("readystatechange",domLoaded);
|
||||
document.querySelectorAll("li").forEach(li => {
|
||||
console.log(li);
|
||||
if( li.innerHTML.indexOf( '[' ) !== -1 ){
|
||||
li.innerHTML = li.innerHTML.replace(/\[ \]/g, '☐');
|
||||
li.innerHTML = li.innerHTML.replace(/\[x\]/g, '☒');
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
console.log("I get here");
|
||||
if(document.readyState == "loading"){
|
||||
|
||||
//If the dom hasn't loaded, wait until it is
|
||||
document.addEventListener("readystatechange",domLoaded);
|
||||
return;
|
||||
} else {
|
||||
//If it has, run the domLoaded function
|
||||
domLoaded();
|
||||
}
|
||||
}))();
|
Loading…
Add table
Add a link
Reference in a new issue