0% found this document useful (0 votes)
40 views

Custom JavaScript For Websites

This document contains custom JavaScript code for manipulating websites. The code removes all <div> elements that do not contain the text "Click Here to Play". It then finds the href attribute of the <a> element within the remaining <div> and logs the link to the console. After 2 seconds, it opens the link in the same window/tab. The second code sample continuously removes all <div> elements every 1 second, finds the src attribute of the <video> element, and logs it to the console.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

Custom JavaScript For Websites

This document contains custom JavaScript code for manipulating websites. The code removes all <div> elements that do not contain the text "Click Here to Play". It then finds the href attribute of the <a> element within the remaining <div> and logs the link to the console. After 2 seconds, it opens the link in the same window/tab. The second code sample continuously removes all <div> elements every 1 second, finds the src attribute of the <video> element, and logs it to the console.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Custom JavaScript for websites

http://dwatchseries.to

$( "div:not(:contains('Click Here to Play'))" ).remove();

console.clear();

var videolink = $( "div:contains('Click Here to


Play')" ).find("a").attr("href");

console.log(videolink);

setTimeout(function(){window.open(videolink,"_self")},2000);

roletaryk.info (Gorillavid)

console.clear();

clearAllDivs;

function clearAllDivs(){

var allDivs = document.querySelectorAll('div');

for (i=1 ; i<allDivs.length ; i++) {

allDivs[i].remove();

setTimeout(clearAllDivs,1000);

var videolink = $("video").attr("src");

console.clear();

console.log(videolink);

You might also like