Last active
July 27, 2021 15:18
-
-
Save nunq/27027124d9c518b60d02ee833a1319cb to your computer and use it in GitHub Desktop.
javascript snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# print all href links in list, however deep. use devtools, rightclick > copy > selector | |
document.querySelectorAll(" SELECTOR ").forEach(y=>console.log(y.href)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# iserv-mark-all-tasks-done.js | |
rows=document.querySelectorAll("td.iserv-admin-list-field.iserv-admin-list-field-entity");for(i=0;i<rows.length;i+=2){rows[i].innerHTML==""?rows[i].insertAdjacentHTML('afterbegin','<span class="text-success text-center">✅</span>'):true;} | |
# use orig icons | |
rows=document.querySelectorAll("td.iserv-admin-list-field.iserv-admin-list-field-text");for(i=0;i<rows.length;i+=2){rows[i].innerHTML==""?rows[i].insertAdjacentHTML('afterbegin','<span class="text-success text-center"><span class="glyphicon glyphicon-ok"></span>'):true;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# open up the comic | |
# open devtools (F12), try either of these two snippets: | |
# 1 | |
console.log("https://tapas.io/rss/series/"+document.getElementsByClassName("subscribe-btn")[0].dataset.id) | |
# 2 | |
console.log("https://tapas.io/rss/series/"+document.getElementsByClassName("js-subscribe-cnt")[0].href.replace(/.*series_id=(.*?)/g, "$1")) | |
# paste the url into your rss reader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# open up the comic (either the 'comic overview' or a specific episode) | |
# open devtools (F12), paste this into the console: | |
console.log(location.href.replace(/(webtoons.com\/en\/challenge\/.*?\/).*(title_no=\d*).*/, "$1rss?$2")) | |
# paste the url into your rss reader |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment