Skip to content

Instantly share code, notes, and snippets.

@nunq
Last active July 27, 2021 15:18
Show Gist options
  • Save nunq/27027124d9c518b60d02ee833a1319cb to your computer and use it in GitHub Desktop.
Save nunq/27027124d9c518b60d02ee833a1319cb to your computer and use it in GitHub Desktop.
javascript snippets
# print all href links in list, however deep. use devtools, rightclick > copy > selector
document.querySelectorAll(" SELECTOR ").forEach(y=>console.log(y.href))
# 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;}
# 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
# 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