This file contains hidden or 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
| window.onload = function() { | |
| if(window.location.search!==''){ | |
| const urlQuery = window.location.search.replace('?','').split('&').reduce(function(obj, str, index) { | |
| let strParts = str.split("="); | |
| obj[strParts[0].replace(/\s+/g, '')] = strParts[1]; | |
| return obj; | |
| }, {}); | |
| document.querySelectorAll('a').forEach((e) => { | |
| let newQuery; |
This file contains hidden or 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
| javascript:(function() { var urll = prompt("Check what page?", window.location.href); window.open("https://pagespeed.web.dev/report?url=" + urll, "_blank"); })() |
This file contains hidden or 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
| document.querySelectorAll(".article-body iframe").forEach(el => { | |
| const w = el.getAttribute("width"), h = el.getAttribute("height"); | |
| el.style.setProperty("--x", h / w); | |
| el.style.maxWidth = w + "px"; | |
| el.style.maxHeight = h + "px"; | |
| el.style.height = "calc(var(--x) * 90vw)"; | |
| }); |
This file contains hidden or 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
| javascript:(function() { | |
| const answer = prompt("What should I say?") || "Fine, don't tell me."; | |
| const speak = () => { | |
| const msg = new SpeechSynthesisUtterance(answer); | |
| msg.rate = 0.7; | |
| msg.pitch = 0.8; | |
| msg.voice = speechSynthesis.getVoices().find(v => v.name === "Fiona"); | |
| speechSynthesis.speak(msg); | |
| }; | |
| speechSynthesis.getVoices().length ? speak() : speechSynthesis.addEventListener("voiceschanged", speak, {once: true}); |