javascript:void (async () => { let { default: TD } = await import("https://cdn.skypack.dev/turndown"); let json = [ ...document.querySelectorAll(".text-base"), ].map((i) => ({ html: i.innerHTML, text: i.innerText, markdown: new TD().turndown(i), isPrompt: !i.querySelector(".prose"), })); window.open( URL.createObjectURL( new Blob( [ json .map((i) => i.isPrompt ? `**Prompt**: ${i.text}` : `**ChatGPT**: ${i.markdown}` ) .join("\n\n"), ], { type: "text/plain" } ) ) ); })()
Get a quick answer from google for any question
(async function answer(q) {
var html = await fetch(
`https://cors.explosionscratc.repl.co/google.com/search?q=${encodeURI(q)}`,
{
headers: {
"User-Agent":
"Mozilla/5.0 (X11; CrOS x86_64 13982.88.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.162 Safari/537.36",
},
}
).then((res) => res.text());
window.d = new DOMParser().parseFromString(html, "text/html");
var el =
// Google seems to have added data-attrid to some things
d.querySelector("[data-attrid='wa:/description']") ||
d.querySelector("[id*='lrtl-translation-text']") ||
[...d.querySelectorAll(".kp-header [data-md]")][1] ||
//Calculator results
[...d.querySelectorAll(".vXQmIe")]?.slice(-1)?.[0]?.value ||
[...d.querySelectorAll(".kCrYT")]?.[1] ||
[...d.querySelectorAll("*")]
.filter((i) => i.innerText)
.filter((i) => i.innerText.includes("Calculator Result"))
.slice(-2)?.[0]
?.innerText?.split("\n")?.[2] ||
//Big text ("youtube ceo"):
d.querySelector(".IZ6rdc") ||
//Lists of stuff ("who was president during world war II")
// ".JjtOHd", and ".ellip" are for different arrangements, e.g. "snl cast members"
[...d.querySelectorAll(".WGwSK, .JjtOHd")]?.map(i => i?.innerText?.replace(i?.querySelector(".cp7THd .FozYP, .ellip")?.innerText, "")).join(", ") ||
//Snippets
[...d.querySelectorAll("div, span")]
.filter((i) => i.innerText)
.filter(
(i) =>
i.innerText.includes("Featured snippet from the web") ||
i.innerText.includes("Description") ||
i.innerText.includes("Calculator result")
)?.slice(-1)?.[0]?.innerText?.replace(/^(?:description|calculator result | featured snippet from the web)/i, "") ||
//Cards (like at the side)
d.querySelector(
".card-section, [class*='__wholepage-card'] [class*='desc'], .kno-rdesc"
)?.innerText?.split("=")?.[1]?.split("(function()")?.[0]?.trim() ||
//Definitions
[...d.querySelectorAll(".thODed")]
.map((i) => i.querySelector("div span"))
.map((i, idx) => `${idx + 1}. ${i?.innerText}`)
.join("\n") ||
[...d.querySelectorAll("[data-async-token]")]?.slice(-1)?.[0] ||
d.querySelector("miniapps-card-header")?.parentElement ||
d.querySelector("#tw-target");
var text =
typeof el == "array" || typeof el == "string" ? el : el?.innerText?.trim();
if (text?.startsWith("Did you mean") || text?.startsWith("In order to show you the most relevant results,")){
return;
}
if (text?.includes("translation") && text?.includes("Google Translate")) {
text = text.split("Verified")[0].trim();
}
text = text?.split("();")?.slice(-1)?.[0]?.split("http")?.[0];//In case we get a script.
text = text?.split(/^Featured snippet from the web/)?.slice(-1)?.[0];//"define epicness"
text = text?.split(/Wikipedia[A-Z]/)?.[0];//Sometimes it adds random stuff to the end. This usually ends in "WikipediaRandomstuff"
text = text?.replace(/ Wikipedia$/, "");//Lol
if (
text?.includes("Calculator Result") &&
text?.includes("Your calculations and results")
) {
text = text
.split("them")?.[1]
.split("(function()")?.[0]
?.split("=")?.[1]
?.trim();
}
return text;
})(prompt("What do you want to know?")).then((a) => alert(a));
Play snake (snek) in a popup window - With music =) Full version at gist.github.com/Explosion-Scratch/01cb5de69b91a47873f1b6f14bef2ccc I minified this.
javascript:{let e=window.open("about:blank","Snek","popup=yes"),t=setInterval((()=>{"complete"===e.document.readyState&&(e.eval(d),e.document.documentElement.innerHTML="<button onclick='main()'>Start</button><style>button {position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 10px 15px; font-size: 1.3rem; font-weight: bold; background: #333; color: white; border-radius: 3px; border: none; cursor: pointer;}</style>",clearInterval(t))}),50),d='function main(){document.documentElement.innerHTML="";var e=document.createElement("canvas");e.width=window.innerWidth,e.height=window.innerHeight,document.body.appendChild(e);var t=e.getContext("2d");let i=new Audio;i.src="https://www.myinstants.com/media/sounds/food_G1U6tlb.mp3",fetch("https://cors.explosionscratc.repl.co/gist.githubusercontent.com/Explosion-Scratch/3691d841ff0b99e4366d18742a369391/raw/e8cc257f6a0667c280876c13b49914e697ab3395/snek.mp3").then((e=>e.text())).then((e=>{let t=new Audio;t.src=e,t.loop=!0,t.play()}));var d={x:e.width/2,y:e.height/2,dx:0,dy:0,size:10,speed:3,tail:[],tailLength:10,color:"#35E464"},n={x:0,y:0,size:10,color:"#E45435"},l=0;function o(){t.clearRect(0,0,e.width,e.height),function(){t.fillStyle=d.color,t.fillRect(d.x,d.y,d.size,d.size);for(var e=0;e<d.tail.length;e++)e===d.tail.length-1?t.fillRect(d.tail[e].x-d.size/2,d.tail[e].y-d.size/2,2*d.size,2*d.size):t.fillRect(d.tail[e].x,d.tail[e].y,d.size,d.size)}(),t.fillStyle=n.color,t.fillRect(n.x,n.y,n.size,n.size),t.fillStyle="#333",t.font="20px Arial",t.fillText("Score: "+l,10,20)}document.addEventListener("keydown",(function(e){37===e.keyCode&&0===d.dx&&(d.dx=-d.speed,d.dy=0),38===e.keyCode&&0===d.dy&&(d.dx=0,d.dy=-d.speed),39===e.keyCode&&0===d.dx&&(d.dx=d.speed,d.dy=0),40===e.keyCode&&0===d.dy&&(d.dx=0,d.dy=d.speed)})),n.x=Math.floor(Math.random()*(e.width-n.size)),n.y=Math.floor(Math.random()*(e.height-n.size));var a=document.createElement("style");a.innerHTML="* { margin: 0; padding: 0; }",document.head.appendChild(a),d.dx=-d.speed,d.dy=0,function t(){!function(){for(d.x+=d.dx,d.y+=d.dy,d.x<0&&(d.x=e.width),d.x>e.width&&(d.x=0),d.y<0&&(d.y=e.height),d.y>e.height&&(d.y=0),d.tail.push({x:d.x,y:d.y});d.tail.length>d.tailLength;)d.tail.shift();Math.hypot(n.x-d.x,n.y-d.y)<20&&(d.tailLength+=10,i.play(),l++,d.speed+=.5,n.x=Math.floor(Math.random()*(e.width-n.size)),n.y=Math.floor(Math.random()*(e.height-n.size)));for(var t=0;t<d.tail.length-1;t++)d.x===d.tail[t].x&&d.y===d.tail[t].y&&(d.tailLength=10,d.tail=[],l=0,d.speed=3)}(),o(),requestAnimationFrame(t)}()}'}
Generate a random username, email, avatar, uuid, etc
javascript: {
import("https://cdn.skypack.dev/@faker-js/faker").then(({ faker: f }) => {
const objFlat = (obj) => {
obj = { ...obj };
delete obj.faker;
const flattened = {};
Object.keys(obj)
.filter((i) => typeof obj[i] === "function" || objtest(obj[i]))
.forEach((key) => {
const value = obj[key];
if (objtest(value)) {
Object.assign(flattened, objFlat(value));
} else {
flattened[key.toLowerCase()] = value;
}
});
return flattened;
};
function objtest(value) {
return (
typeof value === "object" && value !== null && !Array.isArray(value)
);
}
const faker = objFlat(f);
console.log(faker);
let p = "What would you like to generate? (username, email, avatar, etc)";
let answer;
while (!answer) {
answer = prompt(p);
if (!answer) {
answer = "CANCEL";
} else {
answer = answer.toLowerCase().trim();
}
if (answer !== "CANCEL" && !faker[answer]) {
answer = null;
p = `[Invalid], valid keys are: ${Object.keys(faker)}`;
}
}
if (answer === "CANCEL") {
return alert("Cancelled");
}
Promise.resolve(faker[answer]()).then((a) => prompt("Here you go:", a));
});
}
Hold alt while scrolling to scroll 5x faster
javascript: void (() => {
let current = window.scrollY;
const multiplier = 5;
let meta = false;
const keyup = (e) => (meta = e.altKey);
const keydown = (e) => (meta = e.altKey);
const blur = () => (meta = false);
const scroll = (e) => {
console.log(meta);
if (!meta) {
return (current = window.scrollY);
}
const speed = (multiplier - 1) * (window.scrollY - current);
window.scrollBy({ left: 0, top: speed, behavior: "instant" });
current = window.scrollY;
};
window.addEventListener("keyup", keyup);
window.addEventListener("keydown", keydown);
window.addEventListener("blur", blur);
window.addEventListener("scroll", scroll);
})();
Convert a file using Convertio. (Upload file directly, show status, download once converted)
(async () => {
let file = await showOpenFilePicker().then(r => r[0].getFile());
convert(file, prompt("Output format"), ({message, percent}) => {
if (percent){message = `${percent}% - ${message}`}
status(message);
}).then(url => {
console.log(`Finished conversion: `, url);
document.querySelector("#status_convert")?.remove();
try { window.open(url, "_blank"); } catch(e){
prompt("URL to converted file: ", url)
}
})
})()
function status(text){
let el = document.querySelector("#status_convert");
if (!el){
let e = document.createElement("div");
e.id = "status_convert";
e.setAttribute("style", `
position: fixed;
bottom: 0;
right: 0;
display: block;
background: white;
border-radius: 3px;
border: 1px solid #0001;
padding: .3rem .5rem;
color: #666;
`)
document.body.appendChild(e);
el = e;
}
el.innerText = text;
}
async function convert(file, format, progress = () => {}){
if (!(file && format && progress)){
return progress({
percent: 0,
message: "No file or format given"
})
}
const KEY = `8688a5872e01895ed37534314211cdfa`;
progress({
percent: 0,
message: "Starting upload..."
})
let f = await fetch("https://api.convertio.co/convert", {
method: "POST",
headers: {
"content-type": "application/json",
},
body: JSON.stringify({
apikey: KEY,
input: "upload",
filename: file.name,
outputformat: format,
options: "",
})
}).then(r => r.json())
if (!f.data.id){
throw new Error("File upload failed (no id found)")
}
const id = f.data.id;
progress({
percent: 0,
message: "Uploading file..."
})
await fetch(`https://api.convertio.co/convert/${id}/${(file.name)}`, {
method: "PUT",
body: file,
}).then(r => r.json()).then(console.log)
progress({
percent: 0,
message: "Uploaded file"
})
let output = await new Promise(resolve => {
let int = setInterval(async () => {
if (window.STOP_CONVERSION){
let res = await fetch(`https://api.convertio.co/convert/${id}`, {method: "DELETE"}).then(r => r.json());
console.log(res);
clearInterval(int);
}
let r = await fetch(`https://api.convertio.co/convert/${id}/status`).then(r => r.json())
if (!(r.code === 200 && r.status === "ok")){
clearInterval(int);
console.error(r);
throw new Error(r.error || "Getting status failed")
}
r = r.data;
if (r.step === "finish" && r.step_percent === 100){
clearInterval(int);
resolve(r.output.url);
} else {
progress({
body: r,
percent: r.step_percent,
message: `Current step: ${r.step}`,
})
}
}, 1000)
})
return output;
}
function fd(obj){
let a = new FormData();
for (let [k, v] of Object.entries(obj)){
a.set(k, v);
}
return a;
}
function dataurl(file){
return new Promise(resolve => {
let r = new FileReader();
r.onload = () => {
resolve(r.result)
}
r.readAsDataURL(file)
})
}
Search CDNJS for a library and return the URL of it.
javascript:function searchFor(e){return new Promise(t=>{fetch("https://2qwlvlxzb6-2.algolianet.com/1/indexes/*/queries",{headers:{accept:"*/*","content-type":"application/x-www-form-urlencoded","x-algolia-api-key":"2663c73014d2e4d6d1778cc8ad9fd010","x-algolia-application-id":"2QWLVLXZB6"},body:JSON.stringify({requests:[{indexName:"libraries",params:`query=${encodeURIComponent(e)}`}]}),method:"POST"}).then(e=>e.json()).then(e=>{return e.results[0].hits[0]}).then(t)})}searchFor(prompt("What library do you want to search for?")).then(e=>prompt(`${e.name} (${e.github.user}/${e.github.repo}): ${50===e.description.slice(0,50).length?e.description.slice(0,50)+"...":e.description}`,`https://cdnjs.cloudflare.com/ajax/libs/${e.objectID}/${e.version}/${e.filename}`));
Open a gitpod port number in a new tab (run in a workspace).
window.open(`https://${prompt("Port to open", 3000)}-${location.hostname}`, "_blank")
Listen for changes to any of the page's resources then reload it if there are any changes. Simply link in a script tag. Set window.HOTRELOAD_OPTIONS before running to set custom options.
(async ({
interval = 500,
method = "fetch",
useIframe = false,
resources = [],
autoDetect = true,
resourceTypes = ["navigation", "script", "resource", "link", "img", "other"],
}) => {
if (autoDetect) {
resources = performance
.getEntries()
.filter((i) => resourceTypes.includes(i.initiatorType))
.map((i) => i.name);
} else if (!resources.length) {
resources = [location.href];
}
console.log({ interval, method, useIframe, resources });
if (useIframe) {
document.documentElement.innerHTML = "";
window.stop();
}
let text = await getText(resources, method);
if (useIframe) {
let ifr = document.createElement("iframe");
ifr.id = "hotreload";
(document.body || document.documentElement).appendChild(ifr);
document
.querySelector("iframe#hotreload")
.setAttribute(
"style",
`position: fixed; top: 0; right: 0; left: 0; bottom: 0; display: block;`
);
document.querySelector(
"iframe#hotreload"
).style.width = `${window.innerWidth}px`;
document.querySelector(
"iframe#hotreload"
).style.height = `${window.innerHeight}px`;
update({ old: "", newText: text });
}
let int = setInterval(async () => {
let newText = await getText(resources, method);
if (newText !== text) {
update({ old: text, newText });
}
}, interval);
function update({ old, newText }) {
if (useIframe) {
let ifr = document.querySelector("iframe#hotreload");
if (!ifr) {
throw new Error("[hotreload] iframe#hotreload nonexistant");
}
let dataURL = `data:text/html,${encodeURIComponent(newText)}`;
ifr.src = dataURL;
text = newText;
} else {
clearInterval(int);
location.reload();
}
}
async function getText(resources, method = "fetch") {
return JSON.stringify(
await Promise.all(resources.map((i) => f(i, method)))
);
async function f(url, method) {
method = method.toLowerCase();
if (method === "fetch") {
return await fetch(url).then((res) => res.text());
} else if (method === "xmlhttprequest") {
return await new Promise((resolve) => {
let req = new XMLHttpRequest();
req.addEventListener("load", (r) => resolve(r.responseText));
req.open(url);
req.send();
});
}
}
}
})(window.HOTRELOAD_OPTIONS || {});
Click this bookmarklet directly on an image page to edit the image and then have the opportunity to save or export it.
;(async () => {
let { default: tui } = await import("https://esm.run/tui-image-editor");
let src = document.querySelector("img").src;
let title = document.title;
document.body.innerHTML = `
<style>
.tui-image-editor-header-logo {display: none !important}
</style>
<div id="editor"></div>
`;
await loadIcons();
loadStyles([
`https://nhn.github.io/tui.image-editor/latest/dist/tui-image-editor.css`,
`https://uicdn.toast.com/tui-color-picker/v2.2.6/tui-color-picker.min.css`,
`data:text/css;base64,QGltcG9ydCB1cmwoaHR0cHM6Ly9mb250cy5nb29nbGVhcGlzLmNvbS9jc3M/ZmFtaWx5PU5vdG8rU2Fucyk7CiAgICAgIGh0bWwsCiAgICAgIGJvZHkgewogICAgICAgIGhlaWdodDogMTAwJTsKICAgICAgICBtYXJnaW46IDA7CiAgICAgIH0=`,
]);
await loadScripts([
`https://cdnjs.cloudflare.com/ajax/libs/fabric.js/4.4.0/fabric.js`,
`https://uicdn.toast.com/tui.code-snippet/v1.5.0/tui-code-snippet.min.js`,
`https://uicdn.toast.com/tui-color-picker/v2.2.6/tui-color-picker.js`,
`https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/1.3.3/FileSaver.min.js`,
`https://nhn.github.io/tui.image-editor/latest/dist/tui-image-editor.js`,
`https://nhn.github.io/tui.image-editor/latest/examples/js/theme/white-theme.js`,
`https://nhn.github.io/tui.image-editor/latest/examples/js/theme/black-theme.js`,
]);
let instance = new tui(document.querySelector("#editor"), {
cssMaxWidth: window.innerWidth,
cssMaxHeight: window.innerHeight,
includeUI: {
loadImage: {
path: src,
name: title,
},
theme: window.blackTheme,
initMenu: "filter",
menuBarPosition: "bottom",
},
selectionStyle: {
cornerSize: 20,
cornerColor: "#ffffff",
cornerStrokeColor: "#000000",
transparentCorners: false,
rotatingPointOffset: 70,
},
});
function loadStyles(styles) {
for (let a of styles) {
let style = document.createElement("link");
style.href = a;
style.rel = "stylesheet";
document.head.appendChild(style);
}
}
async function loadScripts(scripts) {
for (let script of scripts) {
let s = document.createElement("script");
s.src = script;
document.head.appendChild(s);
await new Promise((r) => {
s.onload = () => {
r();
};
});
}
}
async function loadIcons() {
document.body.innerHTML += `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" display="none">
<defs id="tui-image-editor-svg-default-icons">
<symbol id="ic-apply" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" stroke="none" fill="none"></path>
<path fill="none" stroke="inherit" d="M4 12.011l5 5L20.011 6"></path>
</symbol>
<symbol id="ic-cancel" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" fill="none" stroke="none"></path>
<path fill="none" stroke="inherit" d="M6 6l12 12M18 6L6 18"></path>
</symbol>
<symbol id="ic-crop" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" stroke="none" fill="none"></path>
<path stroke="none" fill="inherit" d="M4 0h1v20a1 1 0 0 1-1-1V0zM20 17h-1V5h1v12zm0 2v5h-1v-5h1z"></path>
<path stroke="none" fill="inherit" d="M5 19h19v1H5zM4.762 4v1H0V4h4.762zM7 4h12a1 1 0 0 1 1 1H7V4z"></path>
</symbol>
<!-- This icon made by Pixel perfect from www.flaticon.com -->
<symbol id="ic-resize" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" stroke="none" fill="none"></path>
<path stroke="none" fill="inherit" d="M 18.988281 3.011719 C 18.800781 2.824219 18.5 2.824219 18.3125 3.011719 L 11.621094 9.707031 C 11.429688 9.894531 11.429688 10.195312 11.621094 10.378906 C 11.710938 10.472656 11.835938 10.519531 11.957031 10.519531 C 12.078125 10.519531 12.203125 10.472656 12.292969 10.378906 L 18.988281 3.6875 C 19.175781 3.5 19.175781 3.199219 18.988281 3.011719 Z M 18.988281 3.011719 "></path>
<path stroke="none" fill="inherit" d="M 18.652344 2.867188 C 18.386719 2.867188 18.171875 3.082031 18.171875 3.347656 L 18.171875 9.085938 C 18.171875 9.347656 18.386719 9.5625 18.652344 9.5625 C 18.917969 9.5625 19.132812 9.347656 19.132812 9.085938 L 19.132812 3.347656 C 19.132812 3.082031 18.917969 2.867188 18.652344 2.867188 Z M 18.652344 2.867188 "></path>
<path stroke="none" fill="inherit" d="M 18.652344 2.867188 L 12.914062 2.867188 C 12.652344 2.867188 12.4375 3.082031 12.4375 3.347656 C 12.4375 3.613281 12.652344 3.828125 12.914062 3.828125 L 18.652344 3.828125 C 18.917969 3.828125 19.132812 3.613281 19.132812 3.347656 C 19.132812 3.082031 18.917969 2.867188 18.652344 2.867188 Z M 18.652344 2.867188 "></path>
<path stroke="none" fill="inherit" d="M 10.378906 11.621094 C 10.195312 11.433594 9.890625 11.433594 9.703125 11.621094 L 3.007812 18.316406 C 2.820312 18.5 2.820312 18.804688 3.007812 18.992188 C 3.105469 19.085938 3.226562 19.132812 3.347656 19.132812 C 3.46875 19.132812 3.589844 19.085938 3.683594 18.992188 L 10.378906 12.296875 C 10.566406 12.109375 10.566406 11.804688 10.378906 11.621094 Z M 10.378906 11.621094 "></path>
<path stroke="none" fill="inherit" d="M 3.347656 12.4375 C 3.082031 12.4375 2.867188 12.652344 2.867188 12.914062 L 2.867188 18.652344 C 2.867188 18.917969 3.082031 19.132812 3.347656 19.132812 C 3.613281 19.132812 3.828125 18.917969 3.828125 18.652344 L 3.828125 12.914062 C 3.828125 12.652344 3.613281 12.4375 3.347656 12.4375 Z M 3.347656 12.4375 "></path>
<path stroke="none" fill="inherit" d="M 9.085938 18.171875 L 3.347656 18.171875 C 3.082031 18.171875 2.867188 18.386719 2.867188 18.652344 C 2.867188 18.917969 3.082031 19.132812 3.347656 19.132812 L 9.085938 19.132812 C 9.347656 19.132812 9.5625 18.917969 9.5625 18.652344 C 9.5625 18.386719 9.347656 18.171875 9.085938 18.171875 Z M 9.085938 18.171875 "></path>
<path stroke="none" fill="inherit" d="M 20.5625 0 L 1.4375 0 C 0.644531 0 0 0.644531 0 1.4375 L 0 20.5625 C 0 21.355469 0.644531 22 1.4375 22 L 20.5625 22 C 21.355469 22 22 21.355469 22 20.5625 L 22 1.4375 C 22 0.644531 21.355469 0 20.5625 0 Z M 21.042969 20.5625 C 21.042969 20.828125 20.828125 21.042969 20.5625 21.042969 L 1.4375 21.042969 C 1.171875 21.042969 0.957031 20.828125 0.957031 20.5625 L 0.957031 1.4375 C 0.957031 1.171875 1.171875 0.957031 1.4375 0.957031 L 20.5625 0.957031 C 20.828125 0.957031 21.042969 1.171875 21.042969 1.4375 Z M 21.042969 20.5625 "></path>
</symbol>
<!-- -->
<symbol id="ic-delete-all" viewBox="0 0 24 24">
<path stroke="none" fill="inherit" d="M5 23H3a1 1 0 0 1-1-1V6h1v16h2v1zm16-10h-1V6h1v7zM9 13H8v-3h1v3zm3 0h-1v-3h1v3zm3 0h-1v-3h1v3zM14.794 3.794L13 2h-3L8.206 3.794A.963.963 0 0 1 8 2.5l.703-1.055A1 1 0 0 1 9.535 1h3.93a1 1 0 0 1 .832.445L15 2.5a.965.965 0 0 1-.206 1.294zM14.197 4H8.803h5.394z"></path>
<path stroke="none" fill="inherit" d="M0 3h23v1H0zM11.286 21H8.714L8 23H7l1-2.8V20h.071L9.5 16h1l1.429 4H12v.2l1 2.8h-1l-.714-2zm-.357-1L10 17.4 9.071 20h1.858zM20 22h3v1h-4v-7h1v6zm-5 0h3v1h-4v-7h1v6z"></path>
</symbol>
<symbol id="ic-delete" viewBox="0 0 24 24">
<path stroke="none" fill="inherit" d="M3 6v16h17V6h1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6h1zM14.794 3.794L13 2h-3L8.206 3.794A.963.963 0 0 1 8 2.5l.703-1.055A1 1 0 0 1 9.535 1h3.93a1 1 0 0 1 .832.445L15 2.5a.965.965 0 0 1-.206 1.294zM14.197 4H8.803h5.394z"></path>
<path stroke="none" fill="inherit" d="M0 3h23v1H0zM8 10h1v6H8v-6zm3 0h1v6h-1v-6zm3 0h1v6h-1v-6z"></path>
</symbol>
<symbol id="ic-draw-free" viewBox="0 0 32 32">
<path fill="none" stroke="inherit" d="M2.5 20.929C2.594 10.976 4.323 6 7.686 6c5.872 0 2.524 19 7.697 19s1.89-14.929 6.414-14.929 1.357 10.858 5.13 10.858c1.802 0 2.657-2.262 2.566-6.786"></path>
</symbol>
<symbol id="ic-draw-line" viewBox="0 0 32 32">
<path fill="none" stroke="inherit" d="M2 15.5h28"></path>
</symbol>
<symbol id="ic-draw" viewBox="0 0 24 24">
<path fill="none" stroke="inherit" d="M2.5 21.5H5c.245 0 .48-.058.691-.168l.124-.065.14.01c.429.028.85-.127 1.16-.437L22.55 5.405a.5.5 0 0 0 0-.707l-3.246-3.245a.5.5 0 0 0-.707 0L3.162 16.888a1.495 1.495 0 0 0-.437 1.155l.01.14-.065.123c-.111.212-.17.448-.17.694v2.5z"></path>
<path stroke="none" fill="inherit" d="M16.414 3.707l3.89 3.89-.708.706-3.889-3.889z"></path>
</symbol>
<symbol id="ic-filter" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" fill="none" stroke="none"></path>
<path stroke="none" fill="inherit" d="M12 7v1H2V7h10zm6 0h4v1h-4V7zM12 16v1h10v-1H12zm-6 0H2v1h4v-1z"></path>
<path stroke="none" fill="inherit" d="M8.5 20a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7zm0-1a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5zM15.5 11a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7zm0-1a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5z"></path>
</symbol>
<symbol id="ic-flip-reset" viewBox="0 0 31 32">
<path fill="none" stroke="none" d="M31 0H0v32h31z"></path>
<path stroke="none" fill="inherit" d="M28 16a8 8 0 0 1-8 8H3v-1h1v-7H3a8 8 0 0 1 8-8h17v1h-1v7h1zM11 9a7 7 0 0 0-7 7v7h16a7 7 0 0 0 7-7V9H11z"></path>
<path fill="none" stroke="inherit" stroke-linecap="square" d="M24 5l3.5 3.5L24 12M7 20l-3.5 3.5L7 27"></path>
</symbol>
<symbol id="ic-flip-x" viewBox="0 0 32 32">
<path fill="none" stroke="none" d="M32 32H0V0h32z"></path>
<path stroke="none" fill="inherit" d="M17 32h-1V0h1zM27.167 11l.5 3h-1.03l-.546-3h1.076zm-.5-3h-1.122L25 5h-5V4h5.153a1 1 0 0 1 .986.836L26.667 8zm1.5 9l.5 3h-.94l-.545-3h.985zm1 6l.639 3.836A1 1 0 0 1 28.819 28H26v-1h3l-.726-4h.894zM23 28h-3v-1h3v1zM13 4v1H7L3 27h10v1H3.18a1 1 0 0 1-.986-1.164l3.666-22A1 1 0 0 1 6.847 4H13z"></path>
</symbol>
<symbol id="ic-flip-y" viewBox="0 0 32 32">
<path fill="none" stroke="none" d="M0 0v32h32V0z"></path>
<path stroke="none" fill="inherit" d="M0 16v1h32v-1zM11 27.167l3 .5v-1.03l-3-.546v1.076zm-3-.5v-1.122L5 25v-5H4v5.153a1 1 0 0 0 .836.986L8 26.667zm9 1.5l3 .5v-.94l-3-.545v.985zm6 1l3.836.639A1 1 0 0 0 28 28.82V26h-1v3l-4-.727v.894zM28 23v-3h-1v3h1zM4 13h1V7l22-4v10h1V3.18a1 1 0 0 0-1.164-.986l-22 3.667A1 1 0 0 0 4 6.847V13z"></path>
</symbol>
<symbol id="ic-flip" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" fill="none" stroke="none"></path>
<path fill="inherit" stroke="none" d="M11 0h1v24h-1zM19 21v-1h2v-2h1v2a1 1 0 0 1-1 1h-2zm-2 0h-3v-1h3v1zm5-5h-1v-3h1v3zm0-5h-1V8h1v3zm0-5h-1V4h-2V3h2a1 1 0 0 1 1 1v2zm-5-3v1h-3V3h3zM9 3v1H2v16h7v1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7z"></path>
</symbol>
<symbol id="ic-history" viewBox="0 0 24 24">
<path fill="none" stroke="none" d="M0 0H24V24H0z" transform="translate(-740 -16) translate(547 8) translate(193 8)"></path>
<path fill="inherit" stroke="none" d="M12.5 1C18.299 1 23 5.701 23 11.5S18.299 22 12.5 22c-5.29 0-9.665-3.911-10.394-8.999h1.012C3.838 17.534 7.764 21 12.5 21c5.247 0 9.5-4.253 9.5-9.5S17.747 2 12.5 2C8.49 2 5.06 4.485 3.666 8H3h4v1H2V4h1v3.022C4.68 3.462 8.303 1 12.5 1zm.5 5l-.001 5.291 2.537 2.537-.708.708L12.292 12H12V6h1z" transform="translate(-740 -16) translate(547 8) translate(193 8)"></path>
</symbol>
<symbol id="ic-history-check" viewBox="0 0 24 24">
<g fill="none" fill-rule="evenodd">
<path stroke="#555555" d="M4.5 -1L1.5 2 6.5 7" transform="translate(-60 -804) translate(60 804) translate(2 3) rotate(-90 4 3)"></path>
</g>
</symbol>
<symbol id="ic-history-crop" viewBox="0 0 24 24">
<g fill="none" stroke="none" fill-rule="evenodd">
<path d="M0 0H12V12H0z" transform="translate(-84 -804) translate(84 804)"></path>
<path fill="#434343" d="M2 0h1v10c-.552 0-1-.448-1-1V0zM10 9v3H9V9h1zM9 2h1v6H9V2z" transform="translate(-84 -804) translate(84 804)"></path>
<path fill="#434343" d="M2 9H12V10H2zM9 2c.513 0 .936.386.993.883L10 3H3V2h6zM2 3H0V2h2v1z" transform="translate(-84 -804) translate(84 804)"></path>
</g>
</symbol>
<!-- This icon made by Pixel perfect from www.flaticon.com -->
<symbol id="ic-history-resize" viewBox="0 0 24 24">
<g fill="none" stroke="none" fill-rule="evenodd">
<path fill="#434343" d="M 9.492188 1.507812 C 9.398438 1.414062 9.25 1.414062 9.15625 1.507812 L 5.8125 4.851562 C 5.714844 4.945312 5.714844 5.097656 5.8125 5.1875 C 5.855469 5.234375 5.917969 5.257812 5.976562 5.257812 C 6.039062 5.257812 6.101562 5.234375 6.148438 5.1875 L 9.492188 1.84375 C 9.585938 1.75 9.585938 1.601562 9.492188 1.507812 Z M 9.492188 1.507812 "></path>
<path fill="#434343" d="M 9.328125 1.433594 C 9.195312 1.433594 9.085938 1.539062 9.085938 1.671875 L 9.085938 4.542969 C 9.085938 4.671875 9.195312 4.78125 9.328125 4.78125 C 9.460938 4.78125 9.566406 4.671875 9.566406 4.542969 L 9.566406 1.671875 C 9.566406 1.539062 9.460938 1.433594 9.328125 1.433594 Z M 9.328125 1.433594 "></path>
<path fill="#434343" d="M 9.328125 1.433594 L 6.457031 1.433594 C 6.328125 1.433594 6.21875 1.539062 6.21875 1.671875 C 6.21875 1.804688 6.328125 1.914062 6.457031 1.914062 L 9.328125 1.914062 C 9.460938 1.914062 9.566406 1.804688 9.566406 1.671875 C 9.566406 1.539062 9.460938 1.433594 9.328125 1.433594 Z M 9.328125 1.433594 "></path>
<path fill="#434343" d="M 5.1875 5.8125 C 5.097656 5.71875 4.945312 5.71875 4.851562 5.8125 L 1.503906 9.15625 C 1.410156 9.25 1.410156 9.402344 1.503906 9.496094 C 1.554688 9.542969 1.613281 9.566406 1.671875 9.566406 C 1.734375 9.566406 1.796875 9.542969 1.84375 9.496094 L 5.1875 6.148438 C 5.28125 6.054688 5.28125 5.902344 5.1875 5.8125 Z M 5.1875 5.8125 "></path>
<path fill="#434343" d="M 1.671875 6.21875 C 1.539062 6.21875 1.433594 6.328125 1.433594 6.457031 L 1.433594 9.328125 C 1.433594 9.460938 1.539062 9.566406 1.671875 9.566406 C 1.804688 9.566406 1.914062 9.460938 1.914062 9.328125 L 1.914062 6.457031 C 1.914062 6.328125 1.804688 6.21875 1.671875 6.21875 Z M 1.671875 6.21875 "></path>
<path fill="#434343" d="M 4.542969 9.085938 L 1.671875 9.085938 C 1.539062 9.085938 1.433594 9.195312 1.433594 9.328125 C 1.433594 9.460938 1.539062 9.566406 1.671875 9.566406 L 4.542969 9.566406 C 4.671875 9.566406 4.78125 9.460938 4.78125 9.328125 C 4.78125 9.195312 4.671875 9.085938 4.542969 9.085938 Z M 4.542969 9.085938 "></path>
<path fill="#434343" d="M 10.28125 0 L 0.71875 0 C 0.320312 0 0 0.320312 0 0.71875 L 0 10.28125 C 0 10.679688 0.320312 11 0.71875 11 L 10.28125 11 C 10.679688 11 11 10.679688 11 10.28125 L 11 0.71875 C 11 0.320312 10.679688 0 10.28125 0 Z M 10.523438 10.28125 C 10.523438 10.414062 10.414062 10.523438 10.28125 10.523438 L 0.71875 10.523438 C 0.585938 10.523438 0.476562 10.414062 0.476562 10.28125 L 0.476562 0.71875 C 0.476562 0.585938 0.585938 0.476562 0.71875 0.476562 L 10.28125 0.476562 C 10.414062 0.476562 10.523438 0.585938 10.523438 0.71875 Z M 10.523438 10.28125 "></path>
</g>
</symbol>
<!-- -->
<symbol id="ic-history-draw" viewBox="0 0 24 24">
<g fill="none" stroke="none" fill-rule="evenodd">
<path d="M0 1H12V13H0z" transform="translate(-156 -804) translate(156 803)"></path>
<path stroke="#434343" d="M9.622 1.584l1.835 1.658-8.31 8.407L.5 12.5V11l9.122-9.416z" transform="translate(-156 -804) translate(156 803)"></path>
<path fill="#434343" d="M7.628 3.753L10.378 3.753 10.378 4.253 7.628 4.253z" transform="translate(-156 -804) translate(156 803) rotate(45 9.003 4.003)"></path>
</g>
</symbol>
<symbol id="ic-history-filter" viewBox="0 0 24 24">
<g fill="none" stroke="none" fill-rule="evenodd">
<path d="M0 0H12V12H0z" transform="translate(-276 -804) translate(276 804)"></path>
<path fill="#434343" d="M12 3v1H9V3h3zM7 4H0V3h7v1z" transform="translate(-276 -804) translate(276 804)"></path>
<path fill="#434343" d="M12 8v1H9V8h3zM7 9H0V8h7v1z" transform="translate(-276 -804) translate(276 804) matrix(-1 0 0 1 12 0)"></path>
<path fill="#434343" d="M8 1c1.105 0 2 .895 2 2s-.895 2-2 2-2-.895-2-2 .895-2 2-2zm0 1c-.552 0-1 .448-1 1s.448 1 1 1 1-.448 1-1-.448-1-1-1zM4 7c1.105 0 2 .895 2 2s-.895 2-2 2-2-.895-2-2 .895-2 2-2zm0 1c-.552 0-1 .448-1 1s.448 1 1 1 1-.448 1-1-.448-1-1-1z" transform="translate(-276 -804) translate(276 804)"></path>
</g>
</symbol>
<symbol id="ic-history-flip" viewBox="0 0 24 24">
<g fill="none" stroke="none" fill-rule="evenodd">
<path d="M0 0H12V12H0z" transform="translate(-108 -804) translate(108 804)"></path>
<path fill="#434343" d="M6 0L7 0 7 12 6 12zM11 10V9h1v1.5c0 .276-.224.5-.5.5H10v-1h1zM5 1v1H1v8h4v1H.5c-.276 0-.5-.224-.5-.5v-9c0-.276.224-.5.5-.5H5zm7 5v2h-1V6h1zm0-3v2h-1V3h1zM9 1v1H7V1h2zm2.5 0c.276 0 .5.224.5.5V2h-2V1h1.5zM9 11H7v-1h2v1z" transform="translate(-108 -804) translate(108 804)"></path>
</g>
</symbol>
<symbol id="ic-history-icon" viewBox="0 0 24 24">
<g fill="none" stroke="none" fill-rule="evenodd">
<path d="M0 0H12V12H0z" transform="translate(-204 -804) translate(204 804)"></path>
<path stroke="#434343" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.1" d="M6 9.568L2.601 11 2.975 7.467 0.5 4.82 4.13 4.068 6 1 7.87 4.068 11.5 4.82 9.025 7.467 9.399 11z" transform="translate(-204 -804) translate(204 804)"></path>
</g>
</symbol>
<symbol id="ic-history-mask" viewBox="0 0 24 24">
<g fill="none" stroke="none" fill-rule="evenodd">
<g transform="translate(-252 -804) translate(252 804)">
<path d="M0 0H12V12H0z"></path>
<circle cx="6" cy="6" r="2.5" stroke="#444"></circle>
<path fill="#434343" d="M11.5 0c.276 0 .5.224.5.5v11c0 .276-.224.5-.5.5H.5c-.276 0-.5-.224-.5-.5V.5C0 .224.224 0 .5 0h11zM11 1H1v10h10V1z"></path>
</g>
</g>
</symbol>
<symbol id="ic-history-rotate" viewBox="0 0 24 24">
<defs>
<path id="rfn4rylffa" d="M7 12c-.335 0-.663-.025-.983-.074C3.171 11.492 1 9.205 1 6.444c0-1.363.534-2.613 1.415-3.58"></path>
<mask id="6f9gn2dysb" width="6" height="9.136" x="0" y="0" maskUnits="objectBoundingBox">
<use xlink:href="#rfn4rylffa" stroke="434343"></use>
</mask>
</defs>
<g fill="none" stroke="none" fill-rule="evenodd">
<g transform="translate(-132 -804) translate(132 804)">
<path d="M0 0.5H12V12.5H0z"></path>
<path fill="#434343" d="M6.5 1C9.538 1 12 3.462 12 6.5c0 2.37-1.5 4.39-3.6 5.163l-.407-.916C9.744 10.13 11 8.462 11 6.5 11 4.015 8.985 2 6.5 2c-.777 0-1.509.197-2.147.544L4 1.75l-.205-.04C4.594 1.258 5.517 1 6.5 1z"></path>
<use stroke="#434343" stroke-dasharray="2 1.25" stroke-width="1" mask="url(#6f9gn2dysb)" xlink:href="#rfn4rylffa"></use>
<path fill="#434343" d="M4.279 0L6 1.75 4.25 3.571 3.543 2.864 4.586 1.75 3.572 0.707z" transform="matrix(-1 0 0 1 9.543 0)"></path>
</g>
</g>
</symbol>
<symbol id="ic-history-shape" viewBox="0 0 24 24">
<g fill="none" stroke="none" fill-rule="evenodd">
<path d="M0 0H12V12H0z" transform="translate(-180 -804) translate(180 804)"></path>
<path fill="#434343" d="M11.5 4c.276 0 .5.224.5.5v7c0 .276-.224.5-.5.5h-7c-.276 0-.5-.224-.5-.5V8.8h1V11h6V5H8.341l-.568-1H11.5z" transform="translate(-180 -804) translate(180 804)"></path>
<path stroke="#434343" stroke-linecap="round" stroke-linejoin="round" d="M4.5 0.5L8.5 7.611 0.5 7.611z" transform="translate(-180 -804) translate(180 804)"></path>
</g>
</symbol>
<symbol id="ic-history-text" viewBox="0 0 24 24">
<g fill="none" stroke="none" fill-rule="evenodd">
<path d="M0 0H12V12H0z" transform="translate(-228 -804) translate(228 804)"></path>
<path fill="#434343" d="M2 1h8c.552 0 1 .448 1 1H1c0-.552.448-1 1-1z" transform="translate(-228 -804) translate(228 804)"></path>
<path fill="#434343" d="M1 1H2V3H1zM10 1H11V3H10zM5.5 1L6.5 1 6.5 11 5.5 11z" transform="translate(-228 -804) translate(228 804)"></path>
<path fill="#434343" d="M4 10H8V11H4z" transform="translate(-228 -804) translate(228 804)"></path>
</g>
</symbol>
<symbol id="ic-history-load" viewBox="0 0 24 24">
<g fill="none" stroke="none" fill-rule="evenodd">
<path d="M0 0H12V12H0z" transform="translate(-324 -805) translate(324 805)"></path>
<path fill="#434343" d="M5 0c.552 0 1 .448 1 1v1h5.5c.276 0 .5.224.5.5v8c0 .276-.224.5-.5.5H.5c-.276 0-.5-.224-.5-.5V1c0-.552.448-1 1-1h4zm0 1H1v9h10V3H5V1z" transform="translate(-324 -805) translate(324 805)"></path>
<path fill="#434343" d="M1 2L5 2 5 3 1 3z" transform="translate(-324 -805) translate(324 805)"></path>
</g>
</symbol>
<symbol id="ic-history-delete" viewBox="0 0 24 24">
<g fill="none" stroke="none" fill-rule="evenodd">
<g fill="#434343">
<path d="M2 9h8V1h1v8.5c0 .276-.224.5-.5.5h-9c-.276 0-.5-.224-.5-.5V1h1v8zM0 0H12V1H0z" transform="translate(-300 -804) translate(300 804) translate(0 2)"></path>
<path d="M4 3H5V7H4zM7 3H8V7H7z" transform="translate(-300 -804) translate(300 804) translate(0 2)"></path>
<path d="M4 1h4V0h1v1.5c0 .276-.224.5-.5.5h-5c-.276 0-.5-.224-.5-.5V0h1v1z" transform="translate(-300 -804) translate(300 804) matrix(1 0 0 -1 0 2)"></path>
</g>
</g>
</symbol>
<symbol id="ic-history-group" viewBox="0 0 24 24">
<g fill="none" stroke="none" fill-rule="evenodd">
<g transform="translate(-348 -804) translate(348 804)">
<path d="M0 0H12V12H0z"></path>
<path fill="#434343" d="M1 9v2h1v1H.5c-.276 0-.5-.224-.5-.5V9h1zm11 1v1.5c0 .276-.224.5-.5.5H9v-1h2v-1h1zm-4 1v1H6v-1h2zm-3 0v1H3v-1h2zm7-4v2h-1V7h1zM1 6v2H0V6h1zm11-2v2h-1V4h1zM1 3v2H0V3h1zm10.5-3c.276 0 .5.224.5.5V3h-1V1h-1V0h1.5zM6 0v1H4V0h2zm3 0v1H7V0h2zM0 .5C0 .224.224 0 .5 0H3v1H1v1H0V.5zM9.5 4c.276 0 .5.224.5.5v5c0 .276-.224.5-.5.5h-5c-.276 0-.5-.224-.5-.5V8.355c.317.094.652.145 1 .145V9h4V5h-.5c0-.348-.05-.683-.145-1H9.5z"></path>
<circle cx="5" cy="5" r="2.5" stroke="#434343"></circle>
</g>
</g>
</symbol>
<symbol id="ic-icon-arrow-2" viewBox="0 0 32 32">
<path fill="none" stroke="inherit" stroke-linecap="round" stroke-linejoin="round" d="M21.793 18.5H2.5v-5h18.935l-7.6-8h5.872l10.5 10.5-10.5 10.5h-5.914l8-8z"></path>
</symbol>
<symbol id="ic-icon-arrow-3" viewBox="0 0 32 32">
<path fill="none" stroke="inherit" stroke-linecap="round" stroke-linejoin="round" d="M25.288 16.42L14.208 27.5H6.792l11.291-11.291L6.826 4.5h7.381l11.661 11.661-.58.258z"></path>
</symbol>
<symbol id="ic-icon-arrow" viewBox="0 0 32 32">
<path fill="none" stroke="inherit" d="M2.5 11.5v9h18v5.293L30.293 16 20.5 6.207V11.5h-18z"></path>
</symbol>
<symbol id="ic-icon-bubble" viewBox="0 0 32 32">
<path fill="none" stroke="inherit" stroke-linecap="round" stroke-linejoin="round" d="M22.207 24.5L16.5 30.207V24.5H8A6.5 6.5 0 0 1 1.5 18V9A6.5 6.5 0 0 1 8 2.5h16A6.5 6.5 0 0 1 30.5 9v9a6.5 6.5 0 0 1-6.5 6.5h-1.793z"></path>
</symbol>
<symbol id="ic-icon-heart" viewBox="0 0 32 32">
<path fill-rule="nonzero" fill="none" stroke="inherit" d="M15.996 30.675l1.981-1.79c7.898-7.177 10.365-9.718 12.135-13.012.922-1.716 1.377-3.37 1.377-5.076 0-4.65-3.647-8.297-8.297-8.297-2.33 0-4.86 1.527-6.817 3.824l-.38.447-.381-.447C13.658 4.027 11.126 2.5 8.797 2.5 4.147 2.5.5 6.147.5 10.797c0 1.714.46 3.375 1.389 5.098 1.775 3.288 4.26 5.843 12.123 12.974l1.984 1.806z"></path>
</symbol>
<symbol id="ic-icon-load" viewBox="0 0 32 32">
<path fill="none" stroke="inherit" stroke-linecap="round" stroke-linejoin="round" d="M17.314 18.867l1.951-2.53 4 5.184h-17l6.5-8.84 4.549 6.186z"></path>
<path stroke="none" fill="inherit" d="M18.01 4a11.798 11.798 0 0 0 0 1H3v24h24V14.986a8.738 8.738 0 0 0 1 0V29a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h15.01z"></path>
<path stroke="none" fill="inherit" d="M25 3h1v9h-1z"></path>
<path fill="none" stroke="inherit" d="M22 6l3.5-3.5L29 6"></path>
</symbol>
<symbol id="ic-icon-location" viewBox="0 0 32 32">
<path fill="none" stroke="inherit" d="M16 31.28C23.675 23.302 27.5 17.181 27.5 13c0-6.351-5.149-11.5-11.5-11.5S4.5 6.649 4.5 13c0 4.181 3.825 10.302 11.5 18.28z"></path>
<circle fill="none" stroke="inherit" cx="16" cy="13" r="4.5"></circle>
</symbol>
<symbol id="ic-icon-polygon" viewBox="0 0 32 32">
<path fill="none" stroke="inherit" d="M.576 16L8.29 29.5h15.42L31.424 16 23.71 2.5H8.29L.576 16z"></path>
</symbol>
<symbol id="ic-icon-star-2" viewBox="0 0 32 32">
<path fill="none" stroke="inherit" d="M19.446 31.592l2.265-3.272 3.946.25.636-3.94 3.665-1.505-1.12-3.832 2.655-2.962-2.656-2.962 1.12-3.832-3.664-1.505-.636-3.941-3.946.25-2.265-3.271L16 3.024 12.554 1.07 10.289 4.34l-3.946-.25-.636 3.941-3.665 1.505 1.12 3.832L.508 16.33l2.656 2.962-1.12 3.832 3.664 1.504.636 3.942 3.946-.25 2.265 3.27L16 29.638l3.446 1.955z"></path>
</symbol>
<symbol id="ic-icon-star" viewBox="0 0 32 32">
<path fill="none" stroke="inherit" d="M25.292 29.878l-1.775-10.346 7.517-7.327-10.388-1.51L16 1.282l-4.646 9.413-10.388 1.51 7.517 7.327-1.775 10.346L16 24.993l9.292 4.885z"></path>
</symbol>
<symbol id="ic-icon" viewBox="0 0 24 24">
<path fill="none" stroke="inherit" stroke-linecap="round" stroke-linejoin="round" d="M11.923 19.136L5.424 22l.715-7.065-4.731-5.296 6.94-1.503L11.923 2l3.574 6.136 6.94 1.503-4.731 5.296L18.42 22z"></path>
</symbol>
<symbol id="ic-mask-load" viewBox="0 0 32 32">
<path stroke="none" fill="none" d="M0 0h32v32H0z"></path>
<path stroke="none" fill="inherit" d="M18.01 4a11.798 11.798 0 0 0 0 1H3v24h24V14.986a8.738 8.738 0 0 0 1 0V29a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h15.01zM15 23a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-1a5 5 0 1 0 0-10 5 5 0 0 0 0 10z"></path>
<path stroke="none" fill="inherit" d="M25 3h1v9h-1z"></path>
<path fill="none" stroke="inherit" d="M22 6l3.5-3.5L29 6"></path>
</symbol>
<symbol id="ic-mask" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="4.5" stroke="inherit" fill="none"></circle>
<path stroke="none" fill="inherit" d="M2 1h20a1 1 0 0 1 1 1v20a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zm0 1v20h20V2H2z"></path>
</symbol>
<symbol id="ic-redo" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" opacity=".5" fill="none" stroke="none"></path>
<path stroke="none" fill="inherit" d="M21 6H9a6 6 0 1 0 0 12h12v1H9A7 7 0 0 1 9 5h12v1z"></path>
<path fill="none" stroke="inherit" stroke-linecap="square" d="M19 3l2.5 2.5L19 8"></path>
</symbol>
<symbol id="ic-reset" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" opacity=".5" stroke="none" fill="none"></path>
<path stroke="none" fill="inherit" d="M2 13v-1a7 7 0 0 1 7-7h13v1h-1v5h1v1a7 7 0 0 1-7 7H2v-1h1v-5H2zm7-7a6 6 0 0 0-6 6v6h12a6 6 0 0 0 6-6V6H9z"></path>
<path fill="none" stroke="inherit" stroke-linecap="square" d="M19 3l2.5 2.5L19 8M5 16l-2.5 2.5L5 21"></path>
</symbol>
<symbol id="ic-rotate-clockwise" viewBox="0 0 32 32">
<path stroke="none" fill="inherit" d="M29 17h-.924c0 6.627-5.373 12-12 12-6.628 0-12-5.373-12-12C4.076 10.398 9.407 5.041 16 5V4C8.82 4 3 9.82 3 17s5.82 13 13 13 13-5.82 13-13z"></path>
<path fill="none" stroke="inherit" stroke-linecap="square" d="M16 1.5l4 3-4 3"></path>
<path stroke="none" fill="inherit" fill-rule="nonzero" d="M16 4h4v1h-4z"></path>
</symbol>
<symbol id="ic-rotate-counterclockwise" viewBox="0 0 32 32">
<path stroke="none" d="M3 17h.924c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.602-5.331-11.96-11.924-12V4c7.18 0 13 5.82 13 13s-5.82 13-13 13S3 24.18 3 17z"></path>
<path stroke="none" fill="inherit" fill-rule="nonzero" d="M12 4h4v1h-4z"></path>
<path fill="none" stroke="inherit" stroke-linecap="square" d="M16 1.5l-4 3 4 3"></path>
</symbol>
<symbol id="ic-rotate" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" fill="none" stroke="none"></path>
<path fill="inherit" stroke="none" d="M8.349 22.254a10.002 10.002 0 0 1-2.778-1.719l.65-.76a9.002 9.002 0 0 0 2.495 1.548l-.367.931zm2.873.704l.078-.997a9 9 0 1 0-.557-17.852l-.14-.99A10.076 10.076 0 0 1 12.145 3c5.523 0 10 4.477 10 10s-4.477 10-10 10c-.312 0-.62-.014-.924-.042zm-7.556-4.655a9.942 9.942 0 0 1-1.253-2.996l.973-.234a8.948 8.948 0 0 0 1.124 2.693l-.844.537zm-1.502-5.91A9.949 9.949 0 0 1 2.88 9.23l.925.382a8.954 8.954 0 0 0-.644 2.844l-.998-.062zm2.21-5.686c.687-.848 1.51-1.58 2.436-2.166l.523.852a9.048 9.048 0 0 0-2.188 1.95l-.771-.636z"></path>
<path stroke="inherit" fill="none" stroke-linecap="square" d="M13 1l-2.5 2.5L13 6"></path>
</symbol>
<symbol id="ic-shape-circle" viewBox="0 0 32 32">
<circle cx="16" cy="16" r="14.5" fill="none" stroke="inherit"></circle>
</symbol>
<symbol id="ic-shape-rectangle" viewBox="0 0 32 32">
<rect width="27" height="27" x="2.5" y="2.5" fill="none" stroke="inherit" rx="1"></rect>
</symbol>
<symbol id="ic-shape-triangle" viewBox="0 0 32 32">
<path fill="none" stroke-linecap="round" stroke-linejoin="round" d="M16 2.5l15.5 27H.5z"></path>
</symbol>
<symbol id="ic-shape" viewBox="0 0 24 24">
<path stroke="none" fill="inherit" d="M14.706 8H21a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1v-4h1v4h12V9h-5.706l-.588-1z"></path>
<path fill="none" stroke="inherit" stroke-linecap="round" stroke-linejoin="round" d="M8.5 1.5l7.5 13H1z"></path>
</symbol>
<symbol id="ic-text-align-center" viewBox="0 0 32 32">
<path stroke="none" fill="none" d="M0 0h32v32H0z"></path>
<path stroke="none" fill="inherit" d="M2 5h28v1H2zM8 12h16v1H8zM2 19h28v1H2zM8 26h16v1H8z"></path>
</symbol>
<symbol id="ic-text-align-left" viewBox="0 0 32 32">
<path stroke="none" fill="none" d="M0 0h32v32H0z"></path>
<path stroke="none" fill="inherit" d="M2 5h28v1H2zM2 12h16v1H2zM2 19h28v1H2zM2 26h16v1H2z"></path>
</symbol>
<symbol id="ic-text-align-right" viewBox="0 0 32 32">
<path stroke="none" fill="none" d="M0 0h32v32H0z"></path>
<path stroke="none" fill="inherit" d="M2 5h28v1H2zM14 12h16v1H14zM2 19h28v1H2zM14 26h16v1H14z"></path>
</symbol>
<symbol id="ic-text-bold" viewBox="0 0 32 32">
<path fill="none" stroke="none" d="M0 0h32v32H0z"></path>
<path stroke="none" fill="inherit" d="M7 2h2v2H7zM7 28h2v2H7z"></path>
<path fill="none" stroke="inherit" stroke-width="2" d="M9 3v12h9a6 6 0 1 0 0-12H9zM9 15v14h10a7 7 0 0 0 0-14H9z"></path>
</symbol>
<symbol id="ic-text-italic" viewBox="0 0 32 32">
<path fill="none" stroke="none" d="M0 0h32v32H0z"></path>
<path stroke="none" fill="inherit" d="M15 2h5v1h-5zM11 29h5v1h-5zM17 3h1l-4 26h-1z"></path>
</symbol>
<symbol id="ic-text-underline" viewBox="0 0 32 32">
<path stroke="none" fill="none" d="M0 0h32v32H0z"></path>
<path stroke="none" fill="inherit" d="M8 2v14a8 8 0 1 0 16 0V2h1v14a9 9 0 0 1-18 0V2h1zM3 29h26v1H3z"></path>
<path stroke="none" fill="inherit" d="M5 2h5v1H5zM22 2h5v1h-5z"></path>
</symbol>
<symbol id="ic-text" viewBox="0 0 24 24">
<path stroke="none" fill="inherit" d="M4 3h15a1 1 0 0 1 1 1H3a1 1 0 0 1 1-1zM3 4h1v1H3zM19 4h1v1h-1z"></path>
<path stroke="none" fill="inherit" d="M11 3h1v18h-1z"></path>
<path stroke="none" fill="inherit" d="M10 20h3v1h-3z"></path>
</symbol>
<symbol id="ic-undo" viewBox="0 0 24 24">
<path d="M24 0H0v24h24z" opacity=".5" fill="none" stroke="none"></path>
<path stroke="none" fill="inherit" d="M3 6h12a6 6 0 1 1 0 12H3v1h12a7 7 0 0 0 0-14H3v1z"></path>
<path fill="none" stroke="inherit" stroke-linecap="square" d="M5 3L2.5 5.5 5 8"></path>
</symbol>
<symbol id="ic-zoom-in" viewBox="0 0 24 24">
<g transform="translate(-229 -290) translate(229 290)">
<circle cx="10.5" cy="10.5" r="9" stroke="inherit" fill="none"></circle>
<path fill="inherit" d="M18.828 15.828H19.828V22.828H18.828z" transform="rotate(-45 19.328 19.328)"></path>
<path fill="inherit" d="M7 10H14V11H7z"></path>
<path fill="inherit" d="M10 7H11V14H10z"></path>
</g>
</symbol>
<symbol id="ic-zoom-out" viewBox="0 0 24 24">
<g transform="translate(-263 -290) translate(263 290)">
<circle cx="10.5" cy="10.5" r="9" stroke="inherit" fill="none"></circle>
<path fill="inherit" d="M18.828 15.828H19.828V22.828H18.828z" transform="rotate(-45 19.328 19.328)"></path>
<path fill="inherit" d="M7 10H14V11H7z"></path>
</g>
</symbol>
<symbol id="ic-hand" viewBox="0 0 24 24">
<g fill="none" fill-rule="evenodd" stroke-linejoin="round">
<path fill="inherit" fill-rule="nonzero" d="M8.672 3.36c1.328 0 2.114.78 2.29 1.869l.014.101.023.006v1.042l-.638-.185c-.187-.055-.323-.211-.354-.399L10 5.713c0-.825-.42-1.353-1.328-1.353C7.695 4.36 7 5.041 7 5.713v7.941c0 .439-.524.665-.843.364l-1.868-1.761c-.595-.528-1.316-.617-1.918-.216-.522.348-.562 1.203-.18 1.8L7.738 22h11.013l.285-.518c1.247-2.326 1.897-4.259 1.96-5.785l.004-.239V8.035c0-.656-.5-1.17-1-1.17-.503 0-1 .456-1 1.17 0 .333-.32.573-.64.48L18 8.41V7.368l.086.026.042-.136c.279-.805.978-1.332 1.738-1.388L20 5.865c1.057 0 2 .967 2 2.17v7.423c0 1.929-.845 4.352-2.521 7.29-.09.156-.255.252-.435.252H7.474c-.166 0-.321-.082-.414-.219l-5.704-8.39c-.653-1.019-.584-2.486.46-3.182 1-.666 2.216-.516 3.148.31L6 12.495V5.713c0-1.18 1.058-2.263 2.49-2.348z" transform="translate(-297 -290) translate(297 290)"></path>
<path fill="inherit" fill-rule="nonzero" d="M12.5 1.5c1.325 0 2.41 1.032 2.495 2.336L15 4v7.22h-1V4c0-.828-.672-1.5-1.5-1.5-.78 0-1.42.595-1.493 1.356L11 4v7.22h-1V4c0-1.38 1.12-2.5 2.5-2.5z" transform="translate(-297 -290) translate(297 290)"></path>
<path fill="inherit" fill-rule="nonzero" d="M16.5 3.5c1.325 0 2.41 1.032 2.495 2.336L19 6v6.3h-1V6c0-.828-.672-1.5-1.5-1.5-.78 0-1.42.595-1.493 1.356L15 6v2.44h-1V6c0-1.38 1.12-2.5 2.5-2.5z" transform="translate(-297 -290) translate(297 290)"></path>
</g>
</symbol>
</defs>
</svg>`;
return;
let i = ["a", "b", "c", "d"];
for (let icon of i) {
let s = await fetch(
`https://unpkg.com/tui-image-editor@3.15.3/dist/svg/icon-${icon}.svg`
).then((r) => r.text());
s = s.replaceAll(/id="icon-[a-z]-/g, `id="`);
document.head.appendChild(
new DOMParser().parseFromString(s, "text/html").querySelector("svg")
);
}
}
})();
Beautify the code in the active editor on svelte.dev/repl. Also logs code before formatting to console in case anything goes wrong.
(async () => {
await fetch(
"https://cdnjs.cloudflare.com/ajax/libs/prettier/2.7.1/standalone.js"
)
.then((r) => r.text())
.then(eval);
await fetch(
"https://cdnjs.cloudflare.com/ajax/libs/prettier/2.7.1/parser-babel.min.js"
)
.then((r) => r.text())
.then(eval);
const { default: plugin } = await import(
"https://cdn.skypack.dev/prettier-plugin-svelte@2.7.0/plugin.js"
);
let el = document.querySelector(".CodeMirror").CodeMirror;
console.log("BACKUP CODE:");
console.log(el.getValue());
el.setValue(
prettier.format(`${el.getValue()}`, {
plugins: { ...prettierPlugins, svelte: plugin },
parser: "svelte",
})
);
})();
Make all console.logs, console.warnings, console.errors, etc show up as toasts on the page as well as logging to the actual console.
let toasts = [];
let hub = () => ({
hub: Object.create(null),
emit(event, data) {
(this.hub[event] || []).forEach((handler) => handler(data));
},
on(event, handler) {
if (!this.hub[event]) this.hub[event] = [];
this.hub[event].push(handler);
},
off(event, handler) {
const i = (this.hub[event] || []).findIndex((h) => h === handler);
if (i > -1) this.hub[event].splice(i, 1);
if (this.hub[event].length === 0) delete this.hub[event];
},
});
const events = hub();
function toast(method, ...data) {
const SCALE = 40;
const id = Math.random().toString(36).slice(2);
toasts = [id, ...toasts];
const colors = {
log: "232, 245, 255",
warn: "255, 228, 158",
error: "255, 92, 92",
debug: "177, 218, 250",
info: "177, 218, 250",
};
let el = document.createElement("div");
el.setAttribute(
"style",
`
border-radius: .3rem;
padding: .5rem 1rem;
width: fit-content;
max-width: min(400px, 30vw);
min-width: 150px;
color: rgb(${darken(colors[method], 130)});
background: rgba(${darken(colors[method], -100)});
border: 2px solid rgba(${darken(colors[method], 20)});
position: fixed;
bottom: -100px;
right: 0px;
margin: 10px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
transition: bottom .4s ease-out, right .4s ease-in;
font-family: monospace;
`
);
el.innerHTML = stringify(data);
document.body.appendChild(el);
events.emit("update");
events.on("update", update);
function update() {
el.style.bottom = `${getIndex() * SCALE}px`;
}
setTimeout(update);
setTimeout(() => (el.style.right = "-400px"), 2000);
setTimeout(() => {
el.remove();
events.off("update", update);
toasts = toasts.filter((i) => i !== id);
events.emit("update", id);
}, 2500);
function getIndex() {
return toasts.indexOf(id);
}
function stringify(log) {
log = log.map((i) => ({ data: i, use: true }));
let styleopen = false;
log = log.map((item, idx) => {
let i = str(item.data);
let index = idx;
i = i.replace(/(?:%(?<letter>c|o))/g, (_, a) => {
index++;
if (a === "o") {
log[index].use = false;
return str(log[index].data);
}
if (a === "c") {
if (!log[index]) {
log[index] = { data: "" };
}
log[index].use = false;
let out = `${styleopen && "</span>"}<span style=${JSON.stringify(
log[index].data?.trim()
)}>`;
styleopen = true;
return out;
}
return "test";
});
log[idx].data = i;
return log[idx];
});
function str(data) {
let str = data;
if (Array.isArray(str) || type(str) === "Object") {
str = JSON.stringify(str);
}
str = str
.toString()
.replaceAll("&", "&")
.replaceAll("<", "<")
.replaceAll(">", ">")
.replaceAll('"', """)
.replaceAll("'", "'");
return str;
}
function type(thing) {
return Object.prototype.toString
.call(thing)
.split(" ")[1]
.replace(/]$/, "");
}
let mapped = log
.filter((i) => i.use || i.before || i.after)
.map((i) => `${i.before || ""}${i.data}${i.after || ""}`);
//The .replace fixes a bug that I can't debug lol
return `${method}: ${mapped.join(", ").replace(/^false<span/, "<span")}${
styleopen ? "</span>" : ""
}`;
}
function type(thing) {
return Object.prototype.toString
.call(thing)
.split(" ")[1]
.replace(/]$/, "")
.toLowerCase();
}
function darken(color, amt) {
return color
.split(",")
.map((i) => i.trim())
.map((i) => +i - amt)
.join(", ");
}
}
const methods = ["log", "warn", "error", "debug", "info"];
for (let method of methods) {
let orig = console[method];
console[method] = (...a) => (toast(method, ...a), orig(...a));
}
Make text sarcastic without breaking your shift key
prompt("hErE yOu gO", prompt("What to make sarcastic").split("").map((i, idx) => idx % 2 === 1 ? i.toUpperCase() : i).join(""))
Send a bunch of dudes with pitchforks across the screen
javascript: {
(async () => {
for (let i = 0; i < 35; i++) {
pitchforkdude();
await new Promise((r) => setTimeout(r, Math.random() * 20 + 20));
}
})();
function pitchforkdude() {
if (!document.getElementById("forkstyle")) {
let el = document.createElement("style");
el.innerText = `#pitchfork{animation:whee var(--speed) linear}@keyframes whee{0%{right:-100px}100%{right:calc(100vw + 100px)}}`;
el.id = "forkstyle";
(document.head || document.body || document.documentElement).appendChild(
el
);
}
let img = new Image();
img.src = pitchfork();
document.body.appendChild(img);
img.id = "pitchfork";
img.setAttribute(
"style",
`
position: fixed;
bottom: ${Math.random() * 5}px;
`
);
let speed = 5;
img.style.setProperty("--speed", `${speed}s`);
let jumping = true;
let currentlyJumping = false;
setTimeout(() => {
jumping = false;
img.remove();
}, speed * 1000);
const jump = () => {
if (currentlyJumping) {
return;
}
currentlyJumping = true;
let height = Math.random() * 30 + 10;
let time = height * 5;
img.style.transition = `bottom ${time}ms ease-out`;
img.style.bottom = `${height}px`;
setTimeout(() => {
img.style.transition = `bottom ${time}ms ease-in`;
img.style.bottom = Math.random() * 5 + "px";
setTimeout(() => (currentlyJumping = false), time);
}, time);
};
setTimeout(jump, 2000 + Math.random() * 300);
}
function pitchfork() {
const forks = [
"jlpfp",
"tjpfp",
"dlpfp",
"tlpft",
"lwpft",
"dlpfp",
"ibpft",
"dlpfp",
"lwpft",
"rrpfp",
"nipft",
"cspfp",
"nipfp",
"nkpft",
"tjpft",
"nipft",
"tlpfp",
"tlpft",
"nipft",
"ibpft",
"ibpfp",
"cspfp",
];
return `https://ssl.gstatic.com/chat/babble/ee/pf/${
forks[Math.floor(Math.random() * forks.length)]
}.gif`;
}
}
Copy a paragraph of bacon ipsum
javascript:fetch("https://baconipsum.com/api/?type=meat-and-filler¶s=1&format=text").then(r => r.text()).then((t) => navigator.clipboard.writeText(t))
Add a pony to the current page. Click multiple times to add multiple ponies.
javascript: {
addPony();
function addPony() {
if (!document.getElementById("ponystyle")) {
let el = document.createElement("style");
el.innerText = `#pony.reverse{transform:scaleX(-1);animation:ponyreverse var(--speed) linear}#pony:not(.reverse){animation:pony var(--speed) linear}@keyframes pony{0%{right:-100px}100%{right:calc(100vw + 100px)}}@keyframes ponyreverse{0%{right:calc(100vw + 100px)}100%{right:-100px}}`;
el.id = "ponystyle";
(document.head || document.body || document.documentElement).appendChild(
el
);
}
let img = new Image();
img.src = pony();
document.body.appendChild(img);
img.id = "pony";
img.setAttribute(
"style",
`
position: fixed;
bottom: 0;
`
);
if (Math.random() < 0.5) {
img.classList.add("reverse");
}
let speed = Math.random() * 5 + 10;
img.style.setProperty("--speed", `${speed}s`);
let jumping = true;
let currentlyJumping = false;
setTimeout(() => {
jumping = false;
img.remove();
}, speed * 1000);
const jump = () => {
if (currentlyJumping) {
return;
}
currentlyJumping = true;
let height = Math.random() * 100 + 100;
let time = height * 3;
img.style.transition = `bottom ${time}ms ease-out`;
img.style.bottom = `${height}px`;
setTimeout(() => {
img.style.transition = `bottom ${time}ms ease-in`;
img.style.bottom = "0px";
setTimeout(() => (currentlyJumping = false), time);
}, time);
};
(async () => {
while (jumping) {
await new Promise((r) => setTimeout(r, Math.random() * 5000));
jump();
}
})();
}
function pony() {
const ponies = [
"dl",
"lw",
"tj",
"dg",
"rs",
"ni",
"bm",
"af",
"cc",
"ib",
"km",
"jl",
"mk",
"mt",
"rr",
"cs",
"tl",
"kr",
"mu",
"zf",
"nk",
];
return `https://ssl.gstatic.com/chat/babble/ee/${
ponies[Math.floor(Math.random() * ponies.length)]
}.gif`;
}
}
Encode a string to base 64, I use this a lot right now for "Basic b64(username:password)" type auth
prompt("Encoded: ", btoa(prompt("What to encode?", "")))
Search GIPHY for a certain gif then get the markdown for the first search result
javascript: {
getGif(prompt("What do you want to search?"));
async function getGif(searchTerm) {
let {
data: [
{
images: {
original: { url },
},
},
],
} = await fetch(
`https://api.giphy.com/v1/gifs/search?api_key=AsBX5vN8qBYmZPGvyyT5TOER8gC0VR8F&q=${encodeURIComponent(
searchTerm
)}`
).then((r) => r.json());
prompt("GIF: ", `![Cool gif](${url})`);
}
}
Search all the bookmarklets here and run them, for example you could search for "𝘏𝘦𝘢𝘥𝘦𝘳𝘴" or "𝘢𝘯𝘴𝘸𝘦𝘳". There is a prompt before running the code that shows the code and name.
fetch(
"https://gist.githubusercontent.com/Explosion-Scratch/c853c40e4c4c0b7ad74f7d8644c238ba/raw"
)
.then((r) => r.text())
.then((text) => {
return text
.split("#" + "##")
.slice(1)
.map((body) => {
let out = {};
out.title = body.split("\n")[0];
out.description = body
.split("\n")
?.slice(1)
?.join("\n")
// Prevent the automated parsing of MD from going wrong
?.split("`" + "``")?.[0];
out.code = body.split("``" + "`")[1]?.split("``" + "`")[0];
out.code = out.code.replace("js\n", "");
out.color = ~~(Math.random() * 360);
out = Object.fromEntries(
Object.entries(out).map(([k, v]) => [k, v.trim?.() || v])
);
return out;
});
})
.then((bookmarklets) => {
let search = prompt(
"What bookmarklet are you looking for? (search)",
bookmarklets[Math.floor(Math.random() * bookmarklets.length)].title
);
if (!search) {
return alert("No search");
}
search = search.toLowerCase().trim();
let result = bookmarklets.find(
(i) =>
i.title?.toLowerCase().trim().includes(search)
) || bookmarklets.find(i => i.description?.toLowerCase().trim().includes(search));
if (!result) {
return alert("No search results");
}
let confirm = prompt(
`Run "${result.title}" (${result.description})`,
result.code
);
if (!confirm) {
return alert("Cancelled");
}
eval(result.code);
});
Makes the beggining half of every word on the page bold. This idea comes from the Jiffy Reader extension (https://chrome.google.com/webstore/detail/jiffy-reader/lljedihjnnjjefafchaljkhbpfhfkdic/)
function highlightText(sentenceText) {
return sentenceText
.split(" ")
.map((word) => {
// special case - hyphenated compound word, e.g. video-game
if (word.includes("-")) {
return word
.split("-")
.map((component) => highlightText(component))
.join("-");
}
const hasNumber = /\d/;
if (hasNumber.test(word)) {
return word;
}
const { length } = word;
let midPoint = 1;
if (length > 3) midPoint = Math.round(length / 2);
const firstHalf = word.slice(0, midPoint);
const secondHalf = word.slice(midPoint);
const htmlWord = `<br-bold>${firstHalf}</br-bold>${secondHalf}`;
return htmlWord;
})
.join(" ");
}
function main() {
// check if we have already highlighted the text
const boldedElements = document.getElementsByTagName("br-bold");
// only add br bold to body element
document.body.classList.toggle("br-bold");
if (boldedElements.length) {
// end if no br-bold elements found on the page
return;
}
// setting global styles
const style = document.createElement("style");
style.textContent =
".br-bold br-bold { font-weight: bold !important; display: inline; line-height: var(--br-line-height,initial); }";
document.head.appendChild(style);
const tags = ["p", "font", "span", "li"];
const parser = new DOMParser();
tags.forEach((tag) => {
for (const element of document.getElementsByTagName(tag)) {
const n = parser.parseFromString(element.innerHTML, "text/html");
const textArrTransformed = Array.from(n.body.childNodes).map((node) => {
if (node.nodeType === Node.TEXT_NODE) {
return highlightText(node.nodeValue);
}
return node.outerHTML;
});
element.innerHTML = textArrTransformed.join(" ");
}
});
}
main();
Enable video.js + hotkeys plugin on all videos on the page, this may break webpages with preexisting video players, and also mess up layout. It also loads several external scripts =|
fetch("https://vjs.zencdn.net/7.19.2/video-js.min.css")
.then((r) => r.text())
.then(
(a) =>
(document.head.appendChild(document.createElement("style")).innerHTML = a)
);
fetch("https://vjs.zencdn.net/7.19.2/video.min.js")
.then((r) => r.text())
.then(eval)
.then(async (a) => {
await fetch("https://cdn.sc.gl/videojs-hotkeys/0.2/videojs.hotkeys.min.js")
.then((r) => r.text())
.then(eval);
Object.values(videojs.players).forEach((p) =>
p.ready(function () {
this.hotkeys({
volumeStep: 0.1,
seekStep: 5,
enableModifiersForNumbers: false,
});
})
);
});
[...document.querySelectorAll("video")].forEach(
(i) => (i.classList.add("video-js"), i.setAttribute("data-setup", "{}"))
);
Play piano in your browser! Credit to @Krazete on GitHub for this (https://github.com/Krazete/bookmarklets/blob/9944bda76495ad24b5008263dfd55e592c4d738e/piano.js)
!function(){var e={css:document.createElement("style"),ui:document.createElement("div"),menuleft:document.createElement("div"),wave:document.createElement("select"),pitch:document.createElement("input"),tilt:document.createElement("input"),keyboard:document.createElement("div"),menuright:document.createElement("div"),audio:new AudioContext,keymap:[{key:"`",caps_key:"~",dom:document.createElement("div"),hz:0,pressed:0},{key:"Tab",caps_key:"Tab",dom:document.createElement("div"),hz:0,pressed:0},{key:"1",caps_key:"!",dom:document.createElement("div"),hz:0,pressed:0},{key:"q",caps_key:"Q",dom:document.createElement("div"),hz:0,pressed:0},{key:"2",caps_key:"@",dom:document.createElement("div"),hz:0,pressed:0},{key:"w",caps_key:"W",dom:document.createElement("div"),hz:0,pressed:0},{key:"3",caps_key:"#",dom:document.createElement("div"),hz:0,pressed:0},{key:"e",caps_key:"E",dom:document.createElement("div"),hz:0,pressed:0},{key:"r",caps_key:"R",dom:document.createElement("div"),hz:0,pressed:0},{key:"5",caps_key:"%",dom:document.createElement("div"),hz:0,pressed:0},{key:"t",caps_key:"T",dom:document.createElement("div"),hz:0,pressed:0},{key:"6",caps_key:"^",dom:document.createElement("div"),hz:0,pressed:0},{key:"y",caps_key:"Y",dom:document.createElement("div"),hz:0,pressed:0},{key:"u",caps_key:"U",dom:document.createElement("div"),hz:0,pressed:0},{key:"8",caps_key:"*",dom:document.createElement("div"),hz:0,pressed:0},{key:"i",caps_key:"I",dom:document.createElement("div"),hz:0,pressed:0},{key:"9",caps_key:"(",dom:document.createElement("div"),hz:0,pressed:0},{key:"o",caps_key:"O",dom:document.createElement("div"),hz:0,pressed:0},{key:"0",caps_key:")",dom:document.createElement("div"),hz:0,pressed:0},{key:"p",caps_key:"P",dom:document.createElement("div"),hz:0,pressed:0},{key:"[",caps_key:"{",dom:document.createElement("div"),hz:0,pressed:0},{key:"=",caps_key:"+",dom:document.createElement("div"),hz:0,pressed:0},{key:"]",caps_key:"}",dom:document.createElement("div"),hz:0,pressed:0},{key:"Backspace",caps_key:"Backspace",dom:document.createElement("div"),hz:0,pressed:0},{key:"\\",caps_key:"|",dom:document.createElement("div"),hz:0,pressed:0},{key:"ShiftLeft",caps_key:"ShiftLeft",dom:document.createElement("div"),hz:0,pressed:0},{key:"a",caps_key:"A",dom:document.createElement("div"),hz:0,pressed:0},{key:"z",caps_key:"Z",dom:document.createElement("div"),hz:0,pressed:0},{key:"s",caps_key:"S",dom:document.createElement("div"),hz:0,pressed:0},{key:"x",caps_key:"X",dom:document.createElement("div"),hz:0,pressed:0},{key:"d",caps_key:"D",dom:document.createElement("div"),hz:0,pressed:0},{key:"c",caps_key:"C",dom:document.createElement("div"),hz:0,pressed:0},{key:"v",caps_key:"V",dom:document.createElement("div"),hz:0,pressed:0},{key:"g",caps_key:"G",dom:document.createElement("div"),hz:0,pressed:0},{key:"b",caps_key:"B",dom:document.createElement("div"),hz:0,pressed:0},{key:"h",caps_key:"H",dom:document.createElement("div"),hz:0,pressed:0},{key:"n",caps_key:"N",dom:document.createElement("div"),hz:0,pressed:0},{key:"m",caps_key:"M",dom:document.createElement("div"),hz:0,pressed:0},{key:"k",caps_key:"K",dom:document.createElement("div"),hz:0,pressed:0},{key:",",caps_key:"<",dom:document.createElement("div"),hz:0,pressed:0},{key:"l",caps_key:"L",dom:document.createElement("div"),hz:0,pressed:0},{key:".",caps_key:">",dom:document.createElement("div"),hz:0,pressed:0},{key:";",caps_key:":",dom:document.createElement("div"),hz:0,pressed:0},{key:"/",caps_key:"?",dom:document.createElement("div"),hz:0,pressed:0},{key:"ShiftRight",caps_key:"ShiftRight",dom:document.createElement("div"),hz:0,pressed:0},{key:"Enter",caps_key:"Enter",dom:document.createElement("div"),hz:0,pressed:0}],disc:[[],[{keyi:53,wave:"triangle",time:0,timeout:null},{keyi:55,wave:"triangle",time:.1973696145124677,timeout:null},{keyi:62,wave:"triangle",time:.4063492063492049,timeout:null},{keyi:55,wave:"triangle",time:.6153287981859421,timeout:null},{keyi:62,wave:"triangle",time:.8533333333333246,timeout:null},{keyi:62,wave:"triangle",time:2.02594104308389,timeout:null},{keyi:60,wave:"triangle",time:2.5135600907029527,timeout:null},{keyi:55,wave:"triangle",time:3.4017233560090574,timeout:null},{keyi:62,wave:"triangle",time:3.60489795918366,timeout:null},{keyi:55,wave:"triangle",time:3.8254875283446665,timeout:null},{keyi:62,wave:"triangle",time:4.028662131519269,timeout:null},{keyi:60,wave:"triangle",time:4.260861678004517,timeout:null},{keyi:58,wave:"triangle",time:4.696235827664395,timeout:null},{keyi:58,wave:"triangle",time:4.905215419501133,timeout:null},{keyi:57,wave:"triangle",time:5.1200000000000045,timeout:null},{keyi:58,wave:"triangle",time:5.340589569160983,timeout:null},{keyi:58,wave:"triangle",time:5.572789115646259,timeout:null},{keyi:51,wave:"triangle",time:6.669931972789101,timeout:null},{keyi:53,wave:"triangle",time:6.873106575963703,timeout:null},{keyi:54,wave:"triangle",time:7.1053061224489795,timeout:null},{keyi:56,wave:"triangle",time:7.3200907029478515,timeout:null},{keyi:58,wave:"triangle",time:7.52907029478456,timeout:null},{keyi:60,wave:"triangle",time:7.73514739229023,timeout:null},{keyi:61,wave:"triangle",time:7.935419501133794,timeout:null},{keyi:63,wave:"triangle",time:8.161814058956907,timeout:null},{keyi:65,wave:"triangle",time:8.399818594104289,timeout:null},{keyi:65,wave:"triangle",time:11.157188208616788,timeout:null},{keyi:65,wave:"triangle",time:11.412607709750574,timeout:null},{keyi:62,wave:"triangle",time:11.839274376417222,timeout:null},{keyi:62,wave:"triangle",time:12.103401360544211,timeout:null},{keyi:58,wave:"triangle",time:12.550385487528331,timeout:null},{keyi:58,wave:"triangle",time:12.817414965986387,timeout:null},{keyi:55,wave:"triangle",time:13.223764172335592,timeout:null},{keyi:58,wave:"triangle",time:13.479183673469379,timeout:null},{keyi:55,wave:"triangle",time:13.862312925170073,timeout:null},{keyi:58,wave:"triangle",time:14.071292517006782,timeout:null},{keyi:60,wave:"triangle",time:14.303492063492058,timeout:null},{keyi:58,wave:"triangle",time:14.5298866213152,timeout:null},{keyi:60,wave:"triangle",time:14.727256235827667,timeout:null},{keyi:62,wave:"triangle",time:14.988480725623589,timeout:null},{keyi:58,wave:"triangle",time:15.23809523809524,timeout:null},{keyi:58,wave:"triangle",time:15.493514739229028,timeout:null},{keyi:53,wave:"triangle",time:15.981133786848062,timeout:null},{keyi:58,wave:"triangle",time:17.055056689342393,timeout:null},{keyi:56,wave:"triangle",time:17.293061224489776,timeout:null},{keyi:58,wave:"triangle",time:17.502040816326513,timeout:null},{keyi:61,wave:"triangle",time:17.7574603174603,timeout:null},{keyi:60,wave:"triangle",time:18.245079365079363,timeout:null},{keyi:58,wave:"triangle",time:18.721088435374156,timeout:null},{keyi:60,wave:"triangle",time:18.918458049886624,timeout:null},{keyi:56,wave:"triangle",time:19.191292517006787,timeout:null},{keyi:68,wave:"triangle",time:21.809342403628108,timeout:null},{keyi:67,wave:"triangle",time:22.064761904761895,timeout:null},{keyi:61,wave:"triangle",time:24.009433106575955,timeout:null},{keyi:60,wave:"triangle",time:24.247437641723337,timeout:null},{keyi:58,wave:"triangle",time:24.479637188208613,timeout:null},{keyi:60,wave:"triangle",time:24.67700680272108,timeout:null},{keyi:58,wave:"triangle",time:24.944036281179137,timeout:null},{keyi:56,wave:"triangle",time:25.45487528344671,timeout:null},{keyi:55,wave:"triangle",time:25.92507936507937,timeout:null},{keyi:56,wave:"triangle",time:26.151473922902483,timeout:null},{keyi:60,wave:"triangle",time:26.412698412698404,timeout:null},{keyi:58,wave:"triangle",time:26.929342403628112,timeout:null},{keyi:53,wave:"triangle",time:28.64761904761903,timeout:null},{keyi:55,wave:"triangle",time:28.879818594104307,timeout:null},{keyi:56,wave:"triangle",time:29.112018140589555,timeout:null},{keyi:55,wave:"triangle",time:29.384852607709746,timeout:null},{keyi:60,wave:"triangle",time:30.27301587301588,timeout:null},{keyi:53,wave:"triangle",time:31.103129251700665,timeout:null},{keyi:55,wave:"triangle",time:34.41777777777776,timeout:null},{keyi:62,wave:"triangle",time:34.649977324263034,timeout:null},{keyi:65,wave:"triangle",time:34.980861678004516,timeout:null},{keyi:62,wave:"triangle",time:35.25369614512471,timeout:null},{keyi:58,wave:"triangle",time:35.497505668934224,timeout:null},{keyi:55,wave:"triangle",time:35.735510204081635,timeout:null},{keyi:58,wave:"triangle",time:35.996734693877556,timeout:null},{keyi:53,wave:"triangle",time:37.0938775510204,timeout:null},{keyi:55,wave:"triangle",time:37.54086167800452,timeout:null},{keyi:62,wave:"triangle",time:37.80208616780044,timeout:null},{keyi:60,wave:"triangle",time:38.04589569160996,timeout:null},{keyi:58,wave:"triangle",time:38.2897052154195,timeout:null},{keyi:60,wave:"triangle",time:38.54512471655329,timeout:null},{keyi:62,wave:"triangle",time:39.07918367346937,timeout:null},{keyi:58,wave:"triangle",time:39.648072562358266,timeout:null},{keyi:65,wave:"triangle",time:40.245986394557804,timeout:null},{keyi:54,wave:"triangle",time:41.63337868480724,timeout:null},{keyi:65,wave:"triangle",time:41.89460317460316,timeout:null},{keyi:54,wave:"triangle",time:42.16743764172335,timeout:null},{keyi:65,wave:"triangle",time:42.393832199546466,timeout:null},{keyi:63,wave:"triangle",time:42.66086167800452,timeout:null},{keyi:61,wave:"triangle",time:42.90467120181404,timeout:null},{keyi:63,wave:"triangle",time:43.14267573696145,timeout:null},{keyi:65,wave:"triangle",time:43.40970521541951,timeout:null},{keyi:60,wave:"triangle",time:43.665124716553294,timeout:null},{keyi:61,wave:"triangle",time:43.937959183673456,timeout:null},{keyi:56,wave:"triangle",time:44.22240362811792,timeout:null},{keyi:53,wave:"triangle",time:44.756462585034,timeout:null},{keyi:56,wave:"triangle",time:45.046712018140596,timeout:null},{keyi:58,wave:"triangle",time:46.71274376417233,timeout:null},{keyi:60,wave:"triangle",time:46.96816326530612,timeout:null},{keyi:61,wave:"triangle",time:47.22938775510204,timeout:null},{keyi:60,wave:"triangle",time:47.76925170068026,timeout:null},{keyi:61,wave:"triangle",time:48.0130612244898,timeout:null},{keyi:60,wave:"triangle",time:48.32653061224488,timeout:null},{keyi:55,wave:"triangle",time:49.27854875283447,timeout:null},{keyi:56,wave:"triangle",time:49.51655328798185,timeout:null},{keyi:58,wave:"triangle",time:49.77777777777777,timeout:null},{keyi:58,wave:"triangle",time:50.02158730158729,timeout:null},{keyi:56,wave:"triangle",time:50.265396825396806,timeout:null},{keyi:55,wave:"triangle",time:50.54403628117913,timeout:null},{keyi:56,wave:"triangle",time:50.793650793650784,timeout:null},{keyi:58,wave:"triangle",time:51.06068027210884,timeout:null},{keyi:60,wave:"triangle",time:51.36834467120181,timeout:null},{keyi:65,wave:"triangle",time:51.7166439909297,timeout:null},{keyi:67,wave:"triangle",time:52.34938775510204,timeout:null},{keyi:68,wave:"triangle",time:52.999546485260765,timeout:null},{keyi:68,wave:"triangle",time:53.5974603174603,timeout:null},{keyi:65,wave:"triangle",time:55.333151927437626,timeout:null},{keyi:65,wave:"triangle",time:55.64662131519273,timeout:null},{keyi:68,wave:"triangle",time:57.301043083900225,timeout:null},{keyi:67,wave:"triangle",time:57.620317460317466,timeout:null}],[{keyi:52,wave:"sine",time:0,timeout:null},{keyi:67,wave:"sine",time:.01160997732421265,timeout:null},{keyi:55,wave:"sine",time:.4353741496598218,timeout:null},{keyi:66,wave:"sine",time:.6501587301586937,timeout:null},{keyi:60,wave:"sine",time:.9055782312925089,timeout:null},{keyi:67,wave:"sine",time:.9113832199546437,timeout:null},{keyi:53,wave:"sine",time:1.3873922902494087,timeout:null},{keyi:65,wave:"sine",time:1.3873922902494087,timeout:null},{keyi:56,wave:"sine",time:1.8111564625850178,timeout:null},{keyi:60,wave:"sine",time:2.226213151927425,timeout:null},{keyi:68,wave:"sine",time:2.2407256235827617,timeout:null},{keyi:48,wave:"sine",time:2.7399546485260657,timeout:null},{keyi:67,wave:"sine",time:2.7399546485260657,timeout:null},{keyi:55,wave:"sine",time:3.2043537414965613,timeout:null},{keyi:60,wave:"sine",time:3.633922902494305,timeout:null},{keyi:64,wave:"sine",time:4.115736961451205,timeout:null},{keyi:55,wave:"sine",time:4.585941043083892,timeout:null},{keyi:64,wave:"sine",time:5.044535147392253,timeout:null},{keyi:52,wave:"sine",time:5.491519274376401,timeout:null},{keyi:67,wave:"sine",time:5.491519274376401,timeout:null},{keyi:55,wave:"sine",time:5.98494331065757,timeout:null},{keyi:64,wave:"sine",time:6.420317460317449,timeout:null},{keyi:68,wave:"sine",time:6.896326530612214,timeout:null},{keyi:47,wave:"sine",time:6.896326530612214,timeout:null},{keyi:53,wave:"sine",time:7.343310657596362,timeout:null},{keyi:67,wave:"sine",time:7.604535147392255,timeout:null},{keyi:56,wave:"sine",time:7.819319727891127,timeout:null},{keyi:65,wave:"sine",time:7.836734693877531,timeout:null},{keyi:67,wave:"sine",time:8.3301587301587,timeout:null},{keyi:48,wave:"sine",time:8.335963718820835,timeout:null},{keyi:52,wave:"sine",time:8.794557823129253,timeout:null},{keyi:55,wave:"sine",time:9.264761904761883,timeout:null},{keyi:58,wave:"sine",time:9.746575963718783,timeout:null}],[{keyi:27,wave:"sawtooth",time:0,timeout:null},{keyi:27,wave:"sawtooth",time:.31927437641723344,timeout:null},{keyi:29,wave:"sawtooth",time:.49342403628117637,timeout:null},{keyi:27,wave:"sawtooth",time:.9810430839002251,timeout:null},{keyi:32,wave:"sawtooth",time:1.4744671201814086,timeout:null},{keyi:31,wave:"sawtooth",time:1.9736961451247126,timeout:null},{keyi:27,wave:"sawtooth",time:2.9663492063492,timeout:null},{keyi:27,wave:"sawtooth",time:3.297233560090696,timeout:null},{keyi:29,wave:"sawtooth",time:3.430748299319724,timeout:null},{keyi:27,wave:"sawtooth",time:3.895147392290248,timeout:null},{keyi:34,wave:"sawtooth",time:4.400181405895687,timeout:null},{keyi:32,wave:"sawtooth",time:4.870385487528345,timeout:null},{keyi:27,wave:"sawtooth",time:5.886258503401358,timeout:null},{keyi:27,wave:"sawtooth",time:6.1997278911564635,timeout:null},{keyi:39,wave:"sawtooth",time:6.368072562358272,timeout:null},{keyi:36,wave:"sawtooth",time:6.861496598639455,timeout:null},{keyi:32,wave:"sawtooth",time:7.337505668934234,timeout:null},{keyi:31,wave:"sawtooth",time:7.865759637188212,timeout:null},{keyi:29,wave:"sawtooth",time:8.405623582766431,timeout:null},{keyi:37,wave:"sawtooth",time:9.589841269841266,timeout:null},{keyi:37,wave:"sawtooth",time:9.891700680272102,timeout:null},{keyi:36,wave:"sawtooth",time:10.11809523809523,timeout:null},{keyi:32,wave:"sawtooth",time:10.628934240362803,timeout:null},{keyi:34,wave:"sawtooth",time:11.206530612244897,timeout:null},{keyi:32,wave:"sawtooth",time:11.789931972789113,timeout:null}],[{keyi:27,wave:"triangle",time:0,timeout:null},{keyi:30,wave:"triangle",time:1.021333333333331,timeout:null},{keyi:25,wave:"triangle",time:2.4799999999999898,timeout:null},{keyi:32,wave:"triangle",time:3.6213333333333253,timeout:null},{keyi:27,wave:"triangle",time:4.661333333333346,timeout:null},{keyi:27,wave:"triangle",time:5.669333333333327,timeout:null},{keyi:30,wave:"triangle",time:6.629333333333335,timeout:null},{keyi:25,wave:"triangle",time:7.501333333333321,timeout:null},{keyi:32,wave:"triangle",time:8.22933333333333,timeout:null},{keyi:51,wave:"triangle",time:11.360000000000014,timeout:null},{keyi:58,wave:"triangle",time:11.981333333333339,timeout:null},{keyi:51,wave:"triangle",time:13.400000000000006,timeout:null},{keyi:51,wave:"triangle",time:14.781333333333322,timeout:null},{keyi:58,wave:"triangle",time:15.181333333333328,timeout:null},{keyi:51,wave:"triangle",time:15.52000000000001,timeout:null},{keyi:58,wave:"triangle",time:15.869333333333344,timeout:null},{keyi:59,wave:"triangle",time:16.189333333333337,timeout:null},{keyi:58,wave:"triangle",time:16.549333333333323,timeout:null},{keyi:51,wave:"triangle",time:16.840000000000003,timeout:null},{keyi:58,wave:"triangle",time:17.149333333333345,timeout:null},{keyi:51,wave:"triangle",time:17.46933333333334,timeout:null},{keyi:58,wave:"triangle",time:17.810666666666663,timeout:null},{keyi:51,wave:"triangle",time:18.141333333333336,timeout:null},{keyi:58,wave:"triangle",time:18.429333333333346,timeout:null},{keyi:59,wave:"triangle",time:18.781333333333322,timeout:null},{keyi:58,wave:"triangle",time:19.090666666666664,timeout:null},{keyi:51,wave:"triangle",time:19.410666666666657,timeout:null},{keyi:58,wave:"triangle",time:19.74133333333333,timeout:null},{keyi:51,wave:"triangle",time:20.101333333333343,timeout:null},{keyi:27,wave:"triangle",time:20.109333333333325,timeout:null},{keyi:58,wave:"triangle",time:20.439999999999998,timeout:null},{keyi:51,wave:"triangle",time:20.75999999999999,timeout:null},{keyi:58,wave:"triangle",time:21.069333333333333,timeout:null},{keyi:59,wave:"triangle",time:21.400000000000006,timeout:null},{keyi:58,wave:"triangle",time:21.661333333333346,timeout:null},{keyi:51,wave:"triangle",time:21.98133333333334,timeout:null},{keyi:58,wave:"triangle",time:22.26933333333332,timeout:null},{keyi:51,wave:"triangle",time:22.581333333333333,timeout:null},{keyi:30,wave:"triangle",time:22.610666666666674,timeout:null},{keyi:58,wave:"triangle",time:22.919999999999987,timeout:null},{keyi:51,wave:"triangle",time:23.330666666666644,timeout:null},{keyi:58,wave:"triangle",time:23.650666666666694,timeout:null},{keyi:59,wave:"triangle",time:23.98933333333335,timeout:null},{keyi:58,wave:"triangle",time:24.309333333333342,timeout:null},{keyi:51,wave:"triangle",time:24.610666666666674,timeout:null},{keyi:58,wave:"triangle",time:24.930666666666667,timeout:null},{keyi:51,wave:"triangle",time:25.25066666666666,timeout:null},{keyi:25,wave:"triangle",time:25.28,timeout:null},{keyi:58,wave:"triangle",time:25.610666666666674,timeout:null},{keyi:51,wave:"triangle",time:25.930666666666667,timeout:null},{keyi:58,wave:"triangle",time:26.26133333333334,timeout:null},{keyi:59,wave:"triangle",time:26.621333333333354,timeout:null},{keyi:58,wave:"triangle",time:26.960000000000008,timeout:null},{keyi:51,wave:"triangle",time:27.28,timeout:null},{keyi:58,wave:"triangle",time:27.54933333333335,timeout:null},{keyi:51,wave:"triangle",time:27.880000000000024,timeout:null},{keyi:32,wave:"triangle",time:27.890666666666647,timeout:null},{keyi:58,wave:"triangle",time:28.159999999999997,timeout:null},{keyi:51,wave:"triangle",time:28.50933333333333,timeout:null},{keyi:58,wave:"triangle",time:28.869333333333344,timeout:null},{keyi:59,wave:"triangle",time:29.22133333333332,timeout:null},{keyi:58,wave:"triangle",time:29.53066666666669,timeout:null},{keyi:51,wave:"triangle",time:29.840000000000003,timeout:null},{keyi:58,wave:"triangle",time:30.181333333333356,timeout:null},{keyi:27,wave:"triangle",time:30.50933333333333,timeout:null},{keyi:51,wave:"triangle",time:30.52000000000001,timeout:null},{keyi:27,wave:"triangle",time:30.78933333333336,timeout:null},{keyi:58,wave:"triangle",time:30.829333333333324,timeout:null},{keyi:27,wave:"triangle",time:31.141333333333336,timeout:null},{keyi:51,wave:"triangle",time:31.189333333333337,timeout:null},{keyi:27,wave:"triangle",time:31.46933333333331,timeout:null},{keyi:58,wave:"triangle",time:31.50933333333333,timeout:null},{keyi:27,wave:"triangle",time:31.821333333333342,timeout:null},{keyi:59,wave:"triangle",time:31.840000000000003,timeout:null},{keyi:27,wave:"triangle",time:32.14933333333332,timeout:null},{keyi:58,wave:"triangle",time:32.20000000000002,timeout:null},{keyi:51,wave:"triangle",time:32.50933333333333,timeout:null},{keyi:27,wave:"triangle",time:32.52000000000001,timeout:null},{keyi:58,wave:"triangle",time:32.82133333333334,timeout:null},{keyi:27,wave:"triangle",time:32.861333333333306,timeout:null},{keyi:51,wave:"triangle",time:33.170666666666676,timeout:null},{keyi:30,wave:"triangle",time:33.181333333333356,timeout:null},{keyi:58,wave:"triangle",time:33.47733333333335,timeout:null},{keyi:30,wave:"triangle",time:33.50133333333335,timeout:null},{keyi:51,wave:"triangle",time:33.82133333333334,timeout:null},{keyi:30,wave:"triangle",time:33.84,timeout:null},{keyi:58,wave:"triangle",time:34.10933333333335,timeout:null},{keyi:30,wave:"triangle",time:34.16,timeout:null},{keyi:59,wave:"triangle",time:34.42666666666665,timeout:null},{keyi:30,wave:"triangle",time:34.50133333333335,timeout:null},{keyi:58,wave:"triangle",time:34.73066666666668,timeout:null},{keyi:30,wave:"triangle",time:34.81066666666666,timeout:null},{keyi:51,wave:"triangle",time:35.08000000000001,timeout:null},{keyi:30,wave:"triangle",time:35.135999999999996,timeout:null},{keyi:58,wave:"triangle",time:35.400000000000006,timeout:null},{keyi:30,wave:"triangle",time:35.45066666666665,timeout:null},{keyi:51,wave:"triangle",time:35.74133333333336,timeout:null},{keyi:25,wave:"triangle",time:35.78133333333332,timeout:null},{keyi:58,wave:"triangle",time:36.05066666666667,timeout:null},{keyi:25,wave:"triangle",time:36.09066666666669,timeout:null},{keyi:51,wave:"triangle",time:36.42133333333331,timeout:null},{keyi:25,wave:"triangle",time:36.440000000000026,timeout:null},{keyi:58,wave:"triangle",time:36.72,timeout:null},{keyi:25,wave:"triangle",time:36.78133333333332,timeout:null},{keyi:59,wave:"triangle",time:37.101333333333315,timeout:null},{keyi:25,wave:"triangle",time:37.119999999999976,timeout:null},{keyi:58,wave:"triangle",time:37.46133333333333,timeout:null},{keyi:25,wave:"triangle",time:37.47200000000001,timeout:null},{keyi:51,wave:"triangle",time:37.79999999999998,timeout:null},{keyi:25,wave:"triangle",time:37.84,timeout:null},{keyi:58,wave:"triangle",time:38.141333333333336,timeout:null},{keyi:25,wave:"triangle",time:38.20000000000002,timeout:null},{keyi:51,wave:"triangle",time:38.429333333333346,timeout:null},{keyi:32,wave:"triangle",time:38.54933333333335,timeout:null},{keyi:58,wave:"triangle",time:38.76000000000002,timeout:null},{keyi:32,wave:"triangle",time:38.861333333333306,timeout:null},{keyi:51,wave:"triangle",time:39.06933333333333,timeout:null},{keyi:32,wave:"triangle",time:39.14933333333332,timeout:null},{keyi:58,wave:"triangle",time:39.400000000000006,timeout:null},{keyi:32,wave:"triangle",time:39.49066666666667,timeout:null},{keyi:59,wave:"triangle",time:39.67999999999998,timeout:null},{keyi:32,wave:"triangle",time:39.81066666666666,timeout:null},{keyi:58,wave:"triangle",time:39.96000000000001,timeout:null},{keyi:32,wave:"triangle",time:40.119999999999976,timeout:null},{keyi:51,wave:"triangle",time:40.30933333333334,timeout:null},{keyi:32,wave:"triangle",time:40.381333333333345,timeout:null},{keyi:58,wave:"triangle",time:40.69066666666666,timeout:null},{keyi:32,wave:"triangle",time:40.70933333333332,timeout:null},{keyi:51,wave:"triangle",time:41.141333333333336,timeout:null}],[{keyi:48,wave:"triangle",time:0,timeout:null},{keyi:48,wave:"triangle",time:.7546485260770979,timeout:null},{keyi:48,wave:"triangle",time:1.5092970521541957,timeout:null},{keyi:44,wave:"triangle",time:2.2871655328798184,timeout:null},{keyi:51,wave:"triangle",time:2.9721541950113384,timeout:null},{keyi:48,wave:"triangle",time:3.262403628117916,timeout:null},{keyi:44,wave:"triangle",time:4.028662131519276,timeout:null},{keyi:51,wave:"triangle",time:4.643990929705215,timeout:null},{keyi:48,wave:"triangle",time:4.934240362811789,timeout:null},{keyi:55,wave:"triangle",time:6.443537414965984,timeout:null},{keyi:55,wave:"triangle",time:7.209795918367345,timeout:null},{keyi:55,wave:"triangle",time:7.941224489795918,timeout:null},{keyi:56,wave:"triangle",time:8.661043083900228,timeout:null},{keyi:51,wave:"triangle",time:9.206712018140589,timeout:null},{keyi:47,wave:"triangle",time:9.508571428571425,timeout:null},{keyi:44,wave:"triangle",time:10.30965986394558,timeout:null},{keyi:51,wave:"triangle",time:10.948208616780047,timeout:null},{keyi:48,wave:"triangle",time:11.226848072562358,timeout:null}],[{keyi:39,wave:"triangle",time:0,timeout:null},{keyi:37,wave:"triangle",time:0,timeout:null},{keyi:39,wave:"triangle",time:.39200000000005275,timeout:null},{keyi:37,wave:"triangle",time:.39200000000005275,timeout:null},{keyi:39,wave:"triangle",time:.7706666666666706,timeout:null},{keyi:37,wave:"triangle",time:.7706666666666706,timeout:null},{keyi:37,wave:"triangle",time:1.1520000000000437,timeout:null},{keyi:39,wave:"triangle",time:1.1706666666667047,timeout:null},{keyi:39,wave:"triangle",time:1.570666666666682,timeout:null},{keyi:37,wave:"triangle",time:1.570666666666682,timeout:null},{keyi:39,wave:"triangle",time:1.970666666666716,timeout:null},{keyi:37,wave:"triangle",time:1.9733333333333576,timeout:null},{keyi:36,wave:"triangle",time:2.3520000000000323,timeout:null},{keyi:39,wave:"triangle",time:2.3706666666666933,timeout:null},{keyi:39,wave:"triangle",time:2.810666666666691,timeout:null},{keyi:36,wave:"triangle",time:2.810666666666691,timeout:null},{keyi:39,wave:"triangle",time:3.2106666666666683,timeout:null},{keyi:36,wave:"triangle",time:3.2106666666666683,timeout:null},{keyi:39,wave:"triangle",time:3.6106666666667024,timeout:null},{keyi:36,wave:"triangle",time:3.6106666666667024,timeout:null},{keyi:39,wave:"triangle",time:4.0400000000000205,timeout:null},{keyi:36,wave:"triangle",time:4.0400000000000205,timeout:null},{keyi:39,wave:"triangle",time:4.432000000000016,timeout:null},{keyi:36,wave:"triangle",time:4.432000000000016,timeout:null},{keyi:43,wave:"triangle",time:4.840000000000032,timeout:null},{keyi:34,wave:"triangle",time:4.840000000000032,timeout:null},{keyi:43,wave:"triangle",time:5.2613333333333685,timeout:null},{keyi:34,wave:"triangle",time:5.2613333333333685,timeout:null},{keyi:34,wave:"triangle",time:5.621333333333382,timeout:null},{keyi:43,wave:"triangle",time:5.661333333333346,timeout:null},{keyi:34,wave:"triangle",time:6.0400000000000205,timeout:null},{keyi:43,wave:"triangle",time:6.06133333333338,timeout:null},{keyi:43,wave:"triangle",time:6.450666666666677,timeout:null},{keyi:34,wave:"triangle",time:6.450666666666677,timeout:null},{keyi:34,wave:"triangle",time:6.810666666666691,timeout:null},{keyi:43,wave:"triangle",time:6.8320000000000505,timeout:null},{keyi:44,wave:"triangle",time:7.28000000000003,timeout:null},{keyi:32,wave:"triangle",time:7.28000000000003,timeout:null},{keyi:44,wave:"triangle",time:8.06133333333338,timeout:null},{keyi:32,wave:"triangle",time:8.06133333333338,timeout:null},{keyi:44,wave:"triangle",time:8.472000000000037,timeout:null},{keyi:32,wave:"triangle",time:8.472000000000037,timeout:null},{keyi:43,wave:"triangle",time:8.877333333333354,timeout:null},{keyi:34,wave:"triangle",time:8.880000000000052,timeout:null},{keyi:36,wave:"triangle",time:9.261333333333369,timeout:null},{keyi:41,wave:"triangle",time:9.28000000000003,timeout:null},{keyi:39,wave:"triangle",time:9.690666666666687,timeout:null},{keyi:37,wave:"triangle",time:9.690666666666687,timeout:null},{keyi:39,wave:"triangle",time:10.120000000000005,timeout:null},{keyi:37,wave:"triangle",time:10.120000000000005,timeout:null},{keyi:39,wave:"triangle",time:10.520000000000039,timeout:null},{keyi:37,wave:"triangle",time:10.520000000000039,timeout:null},{keyi:39,wave:"triangle",time:10.941333333333375,timeout:null},{keyi:37,wave:"triangle",time:10.941333333333375,timeout:null},{keyi:37,wave:"triangle",time:11.330666666666673,timeout:null},{keyi:39,wave:"triangle",time:11.352000000000032,timeout:null},{keyi:39,wave:"triangle",time:11.77066666666667,timeout:null},{keyi:37,wave:"triangle",time:11.77066666666667,timeout:null},{keyi:36,wave:"triangle",time:12.160000000000025,timeout:null},{keyi:39,wave:"triangle",time:12.181333333333384,timeout:null},{keyi:39,wave:"triangle",time:12.592000000000041,timeout:null},{keyi:36,wave:"triangle",time:12.592000000000041,timeout:null},{keyi:39,wave:"triangle",time:13.02133333333336,timeout:null},{keyi:36,wave:"triangle",time:13.02133333333336,timeout:null},{keyi:39,wave:"triangle",time:13.439999999999998,timeout:null},{keyi:36,wave:"triangle",time:13.439999999999998,timeout:null},{keyi:36,wave:"triangle",time:13.850666666666712,timeout:null},{keyi:39,wave:"triangle",time:13.861333333333334,timeout:null},{keyi:39,wave:"triangle",time:14.240000000000009,timeout:null},{keyi:36,wave:"triangle",time:14.240000000000009,timeout:null},{keyi:43,wave:"triangle",time:14.680000000000007,timeout:null},{keyi:34,wave:"triangle",time:14.682666666666705,timeout:null},{keyi:43,wave:"triangle",time:15.090666666666664,timeout:null},{keyi:34,wave:"triangle",time:15.093333333333362,timeout:null},{keyi:43,wave:"triangle",time:15.512,timeout:null},{keyi:34,wave:"triangle",time:15.512,timeout:null},{keyi:34,wave:"triangle",time:15.901333333333355,timeout:null},{keyi:43,wave:"triangle",time:15.912000000000035,timeout:null},{keyi:43,wave:"triangle",time:16.352000000000032,timeout:null},{keyi:34,wave:"triangle",time:16.352000000000032,timeout:null},{keyi:43,wave:"triangle",time:16.760000000000048,timeout:null},{keyi:34,wave:"triangle",time:16.760000000000048,timeout:null},{keyi:44,wave:"triangle",time:17.170666666666705,timeout:null},{keyi:32,wave:"triangle",time:17.170666666666705,timeout:null},{keyi:39,wave:"triangle",time:17.951999999999998,timeout:null},{keyi:37,wave:"triangle",time:17.951999999999998,timeout:null},{keyi:44,wave:"triangle",time:18.432000000000016,timeout:null},{keyi:32,wave:"triangle",time:18.432000000000016,timeout:null}],[{keyi:43,wave:"triangle",time:0,timeout:null},{keyi:43,wave:"triangle",time:.1999999999999993,timeout:null},{keyi:43,wave:"triangle",time:.879999999999999,timeout:null},{keyi:43,wave:"triangle",time:1.5386666666666642,timeout:null},{keyi:44,wave:"triangle",time:1.7680000000000007,timeout:null},{keyi:44,wave:"triangle",time:2.2586666666666666,timeout:null},{keyi:39,wave:"triangle",time:2.84,timeout:null},{keyi:41,wave:"triangle",time:3.3599999999999994,timeout:null},{keyi:41,wave:"triangle",time:4.069333333333333,timeout:null},{keyi:41,wave:"triangle",time:4.407999999999998,timeout:null},{keyi:43,wave:"triangle",time:4.959999999999997,timeout:null},{keyi:43,wave:"triangle",time:5.32,timeout:null},{keyi:43,wave:"triangle",time:6.007999999999999,timeout:null},{keyi:43,wave:"triangle",time:6.279999999999998,timeout:null},{keyi:43,wave:"triangle",time:7.338666666666665,timeout:null},{keyi:43,wave:"triangle",time:7.648,timeout:null},{keyi:43,wave:"triangle",time:8.058666666666667,timeout:null},{keyi:43,wave:"triangle",time:8.559999999999999,timeout:null},{keyi:41,wave:"triangle",time:9,timeout:null},{keyi:41,wave:"triangle",time:9.36,timeout:null},{keyi:39,wave:"triangle",time:9.719999999999999,timeout:null},{keyi:41,wave:"triangle",time:10.168,timeout:null},{keyi:41,wave:"triangle",time:10.527999999999999,timeout:null},{keyi:36,wave:"triangle",time:13.218666666666664,timeout:null},{keyi:41,wave:"triangle",time:13.648,timeout:null},{keyi:41,wave:"triangle",time:14.280000000000001,timeout:null},{keyi:41,wave:"triangle",time:14.629333333333335,timeout:null},{keyi:43,wave:"triangle",time:15.207999999999998,timeout:null},{keyi:43,wave:"triangle",time:15.469333333333331,timeout:null},{keyi:43,wave:"triangle",time:15.839999999999996,timeout:null},{keyi:44,wave:"triangle",time:16.029333333333334,timeout:null},{keyi:44,wave:"triangle",time:16.378666666666668,timeout:null},{keyi:46,wave:"triangle",time:16.858666666666664,timeout:null},{keyi:46,wave:"triangle",time:17.14933333333333,timeout:null},{keyi:46,wave:"triangle",time:17.759999999999998,timeout:null},{keyi:46,wave:"triangle",time:18.349333333333334,timeout:null},{keyi:46,wave:"triangle",time:18.567999999999998,timeout:null},{keyi:46,wave:"triangle",time:18.799999999999997,timeout:null},{keyi:48,wave:"triangle",time:19.08,timeout:null},{keyi:48,wave:"triangle",time:19.65866666666667,timeout:null},{keyi:48,wave:"triangle",time:19.967999999999996,timeout:null},{keyi:48,wave:"triangle",time:20.498666666666665,timeout:null},{keyi:48,wave:"triangle",time:20.858666666666664,timeout:null},{keyi:48,wave:"triangle",time:21.138666666666666,timeout:null},{keyi:48,wave:"triangle",time:21.408,timeout:null},{keyi:48,wave:"triangle",time:21.78933333333333,timeout:null},{keyi:48,wave:"triangle",time:22.119999999999997,timeout:null},{keyi:44,wave:"triangle",time:22.560000000000002,timeout:null},{keyi:43,wave:"triangle",time:23.538666666666664,timeout:null},{keyi:43,wave:"triangle",time:23.82933333333333,timeout:null},{keyi:41,wave:"triangle",time:24.528,timeout:null},{keyi:36,wave:"triangle",time:26.218666666666664,timeout:null},{keyi:37,wave:"triangle",time:26.54933333333333,timeout:null},{keyi:41,wave:"triangle",time:27.28,timeout:null},{keyi:41,wave:"triangle",time:28.069333333333333,timeout:null},{keyi:41,wave:"triangle",time:29.578666666666663,timeout:null},{keyi:37,wave:"triangle",time:30.309333333333335,timeout:null},{keyi:36,wave:"triangle",time:30.629333333333335,timeout:null},{keyi:36,wave:"triangle",time:31.439999999999998,timeout:null},{keyi:36,wave:"triangle",time:33.04,timeout:null},{keyi:41,wave:"triangle",time:33.57866666666666,timeout:null},{keyi:43,wave:"triangle",time:33.86933333333333,timeout:null},{keyi:43,wave:"triangle",time:34.6,timeout:null},{keyi:43,wave:"triangle",time:36.33866666666667,timeout:null},{keyi:41,wave:"triangle",time:37.007999999999996,timeout:null},{keyi:36,wave:"triangle",time:37.32,timeout:null},{keyi:41,wave:"triangle",time:38.33866666666667,timeout:null},{keyi:36,wave:"triangle",time:38.669333333333334,timeout:null},{keyi:34,wave:"triangle",time:39.007999999999996,timeout:null},{keyi:32,wave:"triangle",time:40.10933333333333,timeout:null},{keyi:32,wave:"triangle",time:40.93866666666666,timeout:null},{keyi:36,wave:"triangle",time:43.688,timeout:null},{keyi:41,wave:"triangle",time:44.138666666666666,timeout:null},{keyi:41,wave:"triangle",time:44.888,timeout:null},{keyi:41,wave:"triangle",time:45.14933333333333,timeout:null},{keyi:41,wave:"triangle",time:45.629333333333335,timeout:null},{keyi:43,wave:"triangle",time:45.808,timeout:null},{keyi:43,wave:"triangle",time:46.31999999999999,timeout:null},{keyi:43,wave:"triangle",time:46.58933333333333,timeout:null},{keyi:37,wave:"triangle",time:47.208,timeout:null},{keyi:37,wave:"triangle",time:47.528000000000006,timeout:null},{keyi:39,wave:"triangle",time:48.128,timeout:null},{keyi:39,wave:"triangle",time:48.498666666666665,timeout:null},{keyi:41,wave:"triangle",time:49.007999999999996,timeout:null},{keyi:41,wave:"triangle",time:49.37866666666666,timeout:null},{keyi:41,wave:"triangle",time:49.89866666666667,timeout:null},{keyi:41,wave:"triangle",time:50.239999999999995,timeout:null},{keyi:41,wave:"triangle",time:50.848,timeout:null},{keyi:41,wave:"triangle",time:51.16,timeout:null},{keyi:41,wave:"triangle",time:51.760000000000005,timeout:null},{keyi:41,wave:"triangle",time:52.048,timeout:null},{keyi:41,wave:"triangle",time:52.58933333333333,timeout:null},{keyi:39,wave:"triangle",time:52.848,timeout:null},{keyi:39,wave:"triangle",time:53.37866666666666,timeout:null},{keyi:37,wave:"triangle",time:53.72,timeout:null},{keyi:39,wave:"triangle",time:54.25866666666667,timeout:null},{keyi:39,wave:"triangle",time:54.46933333333334,timeout:null},{keyi:36,wave:"triangle",time:57.09866666666666,timeout:null},{keyi:36,wave:"triangle",time:57.33866666666667,timeout:null},{keyi:37,wave:"triangle",time:57.608000000000004,timeout:null},{keyi:37,wave:"triangle",time:58.208,timeout:null},{keyi:37,wave:"triangle",time:58.50933333333333,timeout:null},{keyi:37,wave:"triangle",time:59.087999999999994,timeout:null},{keyi:39,wave:"triangle",time:59.29866666666666,timeout:null},{keyi:39,wave:"triangle",time:59.61866666666667,timeout:null},{keyi:39,wave:"triangle",time:60.01866666666666,timeout:null},{keyi:41,wave:"triangle",time:60.120000000000005,timeout:null},{keyi:37,wave:"triangle",time:60.688,timeout:null},{keyi:41,wave:"triangle",time:61.10933333333334,timeout:null},{keyi:41,wave:"triangle",time:61.72,timeout:null},{keyi:41,wave:"triangle",time:62.05866666666667,timeout:null},{keyi:41,wave:"triangle",time:62.727999999999994,timeout:null},{keyi:43,wave:"triangle",time:63.03999999999999,timeout:null},{keyi:43,wave:"triangle",time:63.367999999999995,timeout:null},{keyi:43,wave:"triangle",time:63.778666666666666,timeout:null},{keyi:43,wave:"triangle",time:64.14933333333333,timeout:null},{keyi:43,wave:"triangle",time:64.928,timeout:null},{keyi:43,wave:"triangle",time:65.30933333333333,timeout:null},{keyi:43,wave:"triangle",time:65.94933333333333,timeout:null},{keyi:44,wave:"triangle",time:66.208,timeout:null},{keyi:44,wave:"triangle",time:66.81866666666667,timeout:null},{keyi:44,wave:"triangle",time:67.16,timeout:null},{keyi:43,wave:"triangle",time:67.54933333333334,timeout:null},{keyi:43,wave:"triangle",time:68.2,timeout:null},{keyi:39,wave:"triangle",time:68.44,timeout:null},{keyi:39,wave:"triangle",time:69.22933333333333,timeout:null},{keyi:32,wave:"triangle",time:69.98933333333333,timeout:null},{keyi:37,wave:"triangle",time:70.96,timeout:null},{keyi:39,wave:"triangle",time:71.30933333333333,timeout:null},{keyi:39,wave:"triangle",time:72.18933333333334,timeout:null},{keyi:39,wave:"triangle",time:73.888,timeout:null},{keyi:37,wave:"triangle",time:74.45866666666666,timeout:null},{keyi:36,wave:"triangle",time:74.62933333333334,timeout:null},{keyi:36,wave:"triangle",time:75.54933333333334,timeout:null},{keyi:36,wave:"triangle",time:77.14933333333333,timeout:null},{keyi:41,wave:"triangle",time:77.72,timeout:null},{keyi:43,wave:"triangle",time:78.09866666666666,timeout:null},{keyi:43,wave:"triangle",time:79.008,timeout:null},{keyi:43,wave:"triangle",time:80.58933333333333,timeout:null},{keyi:39,wave:"triangle",time:81.18933333333334,timeout:null},{keyi:37,wave:"triangle",time:81.42933333333333,timeout:null},{keyi:39,wave:"triangle",time:82.49866666666667,timeout:null},{keyi:37,wave:"triangle",time:82.78933333333333,timeout:null},{keyi:36,wave:"triangle",time:83.08,timeout:null},{keyi:34,wave:"triangle",time:84.328,timeout:null},{keyi:34,wave:"triangle",time:85.13866666666667,timeout:null}],[{keyi:56,wave:"triangle",time:0,timeout:null},{keyi:60,wave:"triangle",time:.21066666666672518,timeout:null},{keyi:63,wave:"triangle",time:.42933333333337487,timeout:null},{keyi:56,wave:"triangle",time:.6186666666667406,timeout:null},{keyi:60,wave:"triangle",time:.8506666666667115,timeout:null},{keyi:63,wave:"triangle",time:1.0293333333333976,timeout:null},{keyi:56,wave:"triangle",time:1.240000000000009,timeout:null},{keyi:60,wave:"triangle",time:1.4293333333333749,timeout:null},{keyi:56,wave:"triangle",time:1.650666666666666,timeout:null},{keyi:60,wave:"triangle",time:1.8586666666667497,timeout:null},{keyi:63,wave:"triangle",time:2.080000000000041,timeout:null},{keyi:68,wave:"triangle",time:2.2693333333334067,timeout:null},{keyi:63,wave:"triangle",time:2.458666666666659,timeout:null},{keyi:60,wave:"triangle",time:2.6586666666667043,timeout:null},{keyi:56,wave:"triangle",time:2.8693333333334294,timeout:null},{keyi:60,wave:"triangle",time:3.0400000000000773,timeout:null},{keyi:53,wave:"triangle",time:3.3093333333333703,timeout:null},{keyi:56,wave:"triangle",time:3.509333333333416,timeout:null},{keyi:60,wave:"triangle",time:3.6906666666667434,timeout:null},{keyi:56,wave:"triangle",time:3.8986666666667134,timeout:null},{keyi:53,wave:"triangle",time:4.082666666666682,timeout:null},{keyi:56,wave:"triangle",time:4.290666666666766,timeout:null},{keyi:53,wave:"triangle",time:4.490666666666698,timeout:null},{keyi:68,wave:"triangle",time:4.698666666666668,timeout:null},{keyi:56,wave:"triangle",time:4.978666666666754,timeout:null},{keyi:53,wave:"triangle",time:5.229333333333329,timeout:null},{keyi:56,wave:"triangle",time:5.4693333333333385,timeout:null},{keyi:53,wave:"triangle",time:5.680000000000064,timeout:null},{keyi:60,wave:"triangle",time:5.909333333333393,timeout:null},{keyi:56,wave:"triangle",time:6.130666666666684,timeout:null},{keyi:53,wave:"triangle",time:6.349333333333334,timeout:null},{keyi:56,wave:"triangle",time:6.509333333333416,timeout:null},{keyi:51,wave:"triangle",time:6.738666666666745,timeout:null},{keyi:55,wave:"triangle",time:6.949333333333357,timeout:null},{keyi:58,wave:"triangle",time:7.1200000000000045,timeout:null},{keyi:51,wave:"triangle",time:7.370666666666693,timeout:null},{keyi:55,wave:"triangle",time:7.560000000000059,timeout:null},{keyi:58,wave:"triangle",time:7.778666666666709,timeout:null},{keyi:51,wave:"triangle",time:8,timeout:null},{keyi:55,wave:"triangle",time:8.200000000000045,timeout:null},{keyi:68,wave:"triangle",time:8.469333333333338,timeout:null},{keyi:55,wave:"triangle",time:8.850666666666712,timeout:null},{keyi:51,wave:"triangle",time:9.069333333333361,timeout:null},{keyi:58,wave:"triangle",time:9.490666666666698,timeout:null},{keyi:55,wave:"triangle",time:9.690666666666743,timeout:null},{keyi:51,wave:"triangle",time:9.890666666666675,timeout:null},{keyi:49,wave:"triangle",time:10.160000000000082,timeout:null},{keyi:53,wave:"triangle",time:10.389333333333411,timeout:null},{keyi:56,wave:"triangle",time:10.589333333333343,timeout:null},{keyi:49,wave:"triangle",time:10.789333333333389,timeout:null},{keyi:53,wave:"triangle",time:10.960000000000036,timeout:null},{keyi:56,wave:"triangle",time:11.189333333333366,timeout:null},{keyi:49,wave:"triangle",time:11.410666666666657,timeout:null},{keyi:53,wave:"triangle",time:11.600000000000023,timeout:null},{keyi:56,wave:"triangle",time:11.778666666666709,timeout:null},{keyi:49,wave:"triangle",time:12.029333333333398,timeout:null},{keyi:53,wave:"triangle",time:12.200000000000045,timeout:null},{keyi:56,wave:"triangle",time:12.389333333333411,timeout:null},{keyi:49,wave:"triangle",time:12.62933333333342,timeout:null},{keyi:44,wave:"triangle",time:13.109333333333325,timeout:null},{keyi:56,wave:"triangle",time:13.738666666666745,timeout:null},{keyi:60,wave:"triangle",time:14.210666666666725,timeout:null},{keyi:56,wave:"triangle",time:14.450666666666734,timeout:null},{keyi:58,wave:"triangle",time:14.509333333333416,timeout:null},{keyi:56,wave:"triangle",time:14.909333333333393,timeout:null},{keyi:44,wave:"triangle",time:15.62933333333342,timeout:null},{keyi:60,wave:"triangle",time:16.160000000000082,timeout:null},{keyi:58,wave:"triangle",time:16.33066666666673,timeout:null},{keyi:56,wave:"triangle",time:16.568000000000097,timeout:null},{keyi:44,wave:"triangle",time:16.840000000000032,timeout:null},{keyi:60,wave:"triangle",time:17.418666666666695,timeout:null},{keyi:58,wave:"triangle",time:17.879999999999995,timeout:null},{keyi:56,wave:"triangle",time:18.109333333333325,timeout:null},{keyi:44,wave:"triangle",time:18.54933333333338,timeout:null},{keyi:60,wave:"triangle",time:19.200000000000045,timeout:null},{keyi:58,wave:"triangle",time:19.650666666666666,timeout:null},{keyi:56,wave:"triangle",time:19.879999999999995,timeout:null},{keyi:44,wave:"triangle",time:20.09866666666676,timeout:null},{keyi:53,wave:"triangle",time:20.32000000000005,timeout:null},{keyi:53,wave:"triangle",time:20.749333333333425,timeout:null},{keyi:56,wave:"triangle",time:21.029333333333398,timeout:null},{keyi:55,wave:"triangle",time:21.480000000000018,timeout:null},{keyi:53,wave:"triangle",time:21.669333333333384,timeout:null},{keyi:56,wave:"triangle",time:21.898666666666713,timeout:null},{keyi:60,wave:"triangle",time:22.130666666666684,timeout:null},{keyi:56,wave:"triangle",time:22.54933333333338,timeout:null},{keyi:53,wave:"triangle",time:22.78933333333339,timeout:null},{keyi:56,wave:"triangle",time:23.189333333333366,timeout:null},{keyi:53,wave:"triangle",time:23.410666666666657,timeout:null},{keyi:56,wave:"triangle",time:23.600000000000023,timeout:null},{keyi:51,wave:"triangle",time:23.829333333333352,timeout:null},{keyi:55,wave:"triangle",time:24.06933333333336,timeout:null},{keyi:58,wave:"triangle",time:24.25066666666669,timeout:null},{keyi:51,wave:"triangle",time:24.498666666666736,timeout:null},{keyi:53,wave:"triangle",time:25.130666666666684,timeout:null},{keyi:58,wave:"triangle",time:25.610666666666702,timeout:null},{keyi:53,wave:"triangle",time:25.898666666666713,timeout:null},{keyi:51,wave:"triangle",time:26.25066666666669,timeout:null},{keyi:53,wave:"triangle",time:26.639999999999986,timeout:null},{keyi:51,wave:"triangle",time:26.879999999999995,timeout:null},{keyi:58,wave:"triangle",time:27.109333333333325,timeout:null},{keyi:49,wave:"triangle",time:27.33066666666673,timeout:null},{keyi:53,wave:"triangle",time:27.77866666666671,timeout:null},{keyi:56,wave:"triangle",time:28.09066666666672,timeout:null},{keyi:49,wave:"triangle",time:28.520000000000095,timeout:null},{keyi:53,wave:"triangle",time:28.749333333333425,timeout:null},{keyi:56,wave:"triangle",time:28.909333333333393,timeout:null},{keyi:49,wave:"triangle",time:29.138666666666722,timeout:null},{keyi:53,wave:"triangle",time:29.33066666666673,timeout:null},{keyi:56,wave:"triangle",time:29.57066666666674,timeout:null},{keyi:49,wave:"triangle",time:29.78933333333339,timeout:null},{keyi:53,wave:"triangle",time:30.01066666666668,timeout:null},{keyi:56,wave:"triangle",time:30.200000000000045,timeout:null},{keyi:49,wave:"triangle",time:30.418666666666695,timeout:null},{keyi:44,wave:"triangle",time:30.810666666666748,timeout:null},{keyi:56,wave:"triangle",time:31.33066666666673,timeout:null},{keyi:60,wave:"triangle",time:31.800000000000068,timeout:null},{keyi:60,wave:"triangle",time:32.04000000000008,timeout:null},{keyi:68,wave:"triangle",time:32.33066666666673,timeout:null},{keyi:60,wave:"triangle",time:32.92000000000007,timeout:null},{keyi:56,wave:"triangle",time:33.53066666666666,timeout:null},{keyi:44,wave:"triangle",time:33.970666666666716,timeout:null},{keyi:56,wave:"triangle",time:34.57066666666674,timeout:null},{keyi:60,wave:"triangle",time:35.200000000000045,timeout:null},{keyi:68,wave:"triangle",time:35.61866666666674,timeout:null},{keyi:60,wave:"triangle",time:36,timeout:null},{keyi:56,wave:"triangle",time:36.25066666666669,timeout:null},{keyi:68,wave:"triangle",time:36.639999999999986,timeout:null},{keyi:60,wave:"triangle",time:36.85066666666671,timeout:null},{keyi:56,wave:"triangle",time:37.09066666666672,timeout:null},{keyi:68,wave:"triangle",time:37.32000000000005,timeout:null},{keyi:53,wave:"triangle",time:37.54933333333338,timeout:null},{keyi:58,wave:"triangle",time:37.77066666666667,timeout:null},{keyi:53,wave:"triangle",time:38,timeout:null},{keyi:58,wave:"triangle",time:38.109333333333325,timeout:null},{keyi:68,wave:"triangle",time:38.21866666666676,timeout:null},{keyi:56,wave:"triangle",time:38.45866666666666,timeout:null},{keyi:68,wave:"triangle",time:38.669333333333384,timeout:null},{keyi:53,wave:"triangle",time:38.90933333333339,timeout:null},{keyi:58,wave:"triangle",time:39.09866666666676,timeout:null},{keyi:53,wave:"triangle",time:39.32000000000005,timeout:null},{keyi:68,wave:"triangle",time:39.520000000000095,timeout:null},{keyi:56,wave:"triangle",time:39.680000000000064,timeout:null},{keyi:53,wave:"triangle",time:40.189333333333366,timeout:null},{keyi:58,wave:"triangle",time:40.41066666666666,timeout:null},{keyi:68,wave:"triangle",time:40.62933333333342,timeout:null},{keyi:51,wave:"triangle",time:40.85866666666675,timeout:null},{keyi:55,wave:"triangle",time:41.09066666666672,timeout:null},{keyi:58,wave:"triangle",time:41.25066666666669,timeout:null},{keyi:51,wave:"triangle",time:41.509333333333416,timeout:null},{keyi:53,wave:"triangle",time:41.69066666666674,timeout:null},{keyi:58,wave:"triangle",time:41.93066666666675,timeout:null},{keyi:53,wave:"triangle",time:42.16000000000008,timeout:null},{keyi:51,wave:"triangle",time:42.37866666666673,timeout:null},{keyi:51,wave:"triangle",time:42.749333333333425,timeout:null},{keyi:55,wave:"triangle",time:42.978666666666754,timeout:null},{keyi:58,wave:"triangle",time:43.38933333333341,timeout:null},{keyi:51,wave:"triangle",time:43.61866666666674,timeout:null},{keyi:55,wave:"triangle",time:43.81866666666667,timeout:null},{keyi:49,wave:"triangle",time:44.09066666666672,timeout:null},{keyi:53,wave:"triangle",time:44.29866666666669,timeout:null},{keyi:56,wave:"triangle",time:44.520000000000095,timeout:null},{keyi:49,wave:"triangle",time:44.69866666666667,timeout:null},{keyi:51,wave:"triangle",time:44.92000000000007,timeout:null},{keyi:56,wave:"triangle",time:45.1493333333334,timeout:null},{keyi:49,wave:"triangle",time:45.440000000000055,timeout:null},{keyi:51,wave:"triangle",time:45.650666666666666,timeout:null},{keyi:56,wave:"triangle",time:45.86933333333343,timeout:null},{keyi:49,wave:"triangle",time:46.09866666666676,timeout:null},{keyi:51,wave:"triangle",time:46.29866666666669,timeout:null},{keyi:56,wave:"triangle",time:46.54933333333338,timeout:null},{keyi:49,wave:"triangle",time:46.81066666666675,timeout:null},{keyi:51,wave:"triangle",time:47.01866666666672,timeout:null},{keyi:56,wave:"triangle",time:47.25066666666669,timeout:null},{keyi:49,wave:"triangle",time:47.5680000000001,timeout:null},{keyi:51,wave:"triangle",time:47.94933333333336,timeout:null},{keyi:56,wave:"triangle",time:48.429333333333375,timeout:null},{keyi:44,wave:"triangle",time:49.09866666666676,timeout:null},{keyi:56,wave:"triangle",time:49.62933333333342,timeout:null},{keyi:60,wave:"triangle",time:50.26933333333341,timeout:null},{keyi:63,wave:"triangle",time:50.978666666666754,timeout:null},{keyi:68,wave:"triangle",time:51.89866666666671,timeout:null},{keyi:44,wave:"triangle",time:53.73066666666671,timeout:null}],[{keyi:43,wave:"triangle",time:0,timeout:null},{keyi:43,wave:"triangle",time:.1999999999999993,timeout:null},{keyi:43,wave:"triangle",time:.879999999999999,timeout:null},{keyi:43,wave:"triangle",time:1.5386666666666642,timeout:null},{keyi:44,wave:"triangle",time:1.7680000000000007,timeout:null},{keyi:44,wave:"triangle",time:2.2586666666666666,timeout:null},{keyi:39,wave:"triangle",time:2.84,timeout:null},{keyi:41,wave:"triangle",time:3.3599999999999994,timeout:null},{keyi:41,wave:"triangle",time:4.069333333333333,timeout:null},{keyi:41,wave:"triangle",time:4.407999999999998,timeout:null},{keyi:43,wave:"triangle",time:4.959999999999997,timeout:null},{keyi:43,wave:"triangle",time:5.32,timeout:null},{keyi:43,wave:"triangle",time:6.007999999999999,timeout:null},{keyi:43,wave:"triangle",time:6.279999999999998,timeout:null},{keyi:43,wave:"triangle",time:7.338666666666665,timeout:null},{keyi:43,wave:"triangle",time:7.648,timeout:null},{keyi:43,wave:"triangle",time:8.058666666666667,timeout:null},{keyi:43,wave:"triangle",time:8.559999999999999,timeout:null},{keyi:41,wave:"triangle",time:9,timeout:null},{keyi:41,wave:"triangle",time:9.36,timeout:null},{keyi:39,wave:"triangle",time:9.719999999999999,timeout:null},{keyi:41,wave:"triangle",time:10.168,timeout:null},{keyi:41,wave:"triangle",time:10.527999999999999,timeout:null},{keyi:36,wave:"triangle",time:13.218666666666664,timeout:null},{keyi:41,wave:"triangle",time:13.648,timeout:null},{keyi:41,wave:"triangle",time:14.280000000000001,timeout:null},{keyi:41,wave:"triangle",time:14.629333333333335,timeout:null},{keyi:43,wave:"triangle",time:15.207999999999998,timeout:null},{keyi:43,wave:"triangle",time:15.469333333333331,timeout:null},{keyi:43,wave:"triangle",time:15.839999999999996,timeout:null},{keyi:44,wave:"triangle",time:16.029333333333334,timeout:null},{keyi:44,wave:"triangle",time:16.378666666666668,timeout:null},{keyi:46,wave:"triangle",time:16.858666666666664,timeout:null},{keyi:46,wave:"triangle",time:17.14933333333333,timeout:null},{keyi:46,wave:"triangle",time:17.759999999999998,timeout:null},{keyi:46,wave:"triangle",time:18.349333333333334,timeout:null},{keyi:46,wave:"triangle",time:18.567999999999998,timeout:null},{keyi:46,wave:"triangle",time:18.799999999999997,timeout:null},{keyi:48,wave:"triangle",time:19.08,timeout:null},{keyi:48,wave:"triangle",time:19.65866666666667,timeout:null},{keyi:48,wave:"triangle",time:19.967999999999996,timeout:null},{keyi:48,wave:"triangle",time:20.498666666666665,timeout:null},{keyi:48,wave:"triangle",time:20.858666666666664,timeout:null},{keyi:48,wave:"triangle",time:21.138666666666666,timeout:null},{keyi:48,wave:"triangle",time:21.408,timeout:null},{keyi:48,wave:"triangle",time:21.78933333333333,timeout:null},{keyi:48,wave:"triangle",time:22.119999999999997,timeout:null},{keyi:44,wave:"triangle",time:22.560000000000002,timeout:null},{keyi:43,wave:"triangle",time:23.538666666666664,timeout:null},{keyi:43,wave:"triangle",time:23.82933333333333,timeout:null},{keyi:41,wave:"triangle",time:24.528,timeout:null},{keyi:36,wave:"triangle",time:26.218666666666664,timeout:null},{keyi:37,wave:"triangle",time:26.54933333333333,timeout:null},{keyi:41,wave:"triangle",time:27.28,timeout:null},{keyi:41,wave:"triangle",time:28.069333333333333,timeout:null},{keyi:41,wave:"triangle",time:29.578666666666663,timeout:null},{keyi:37,wave:"triangle",time:30.309333333333335,timeout:null},{keyi:36,wave:"triangle",time:30.629333333333335,timeout:null},{keyi:36,wave:"triangle",time:31.439999999999998,timeout:null},{keyi:36,wave:"triangle",time:33.04,timeout:null},{keyi:41,wave:"triangle",time:33.57866666666666,timeout:null},{keyi:43,wave:"triangle",time:33.86933333333333,timeout:null},{keyi:43,wave:"triangle",time:34.6,timeout:null},{keyi:43,wave:"triangle",time:36.33866666666667,timeout:null},{keyi:41,wave:"triangle",time:37.007999999999996,timeout:null},{keyi:36,wave:"triangle",time:37.32,timeout:null},{keyi:41,wave:"triangle",time:38.33866666666667,timeout:null},{keyi:36,wave:"triangle",time:38.669333333333334,timeout:null},{keyi:34,wave:"triangle",time:39.007999999999996,timeout:null},{keyi:32,wave:"triangle",time:40.10933333333333,timeout:null},{keyi:32,wave:"triangle",time:40.93866666666666,timeout:null},{keyi:36,wave:"triangle",time:43.688,timeout:null},{keyi:41,wave:"triangle",time:44.138666666666666,timeout:null},{keyi:41,wave:"triangle",time:44.888,timeout:null},{keyi:41,wave:"triangle",time:45.14933333333333,timeout:null},{keyi:41,wave:"triangle",time:45.629333333333335,timeout:null},{keyi:43,wave:"triangle",time:45.808,timeout:null},{keyi:43,wave:"triangle",time:46.31999999999999,timeout:null},{keyi:43,wave:"triangle",time:46.58933333333333,timeout:null},{keyi:37,wave:"triangle",time:47.208,timeout:null},{keyi:37,wave:"triangle",time:47.528000000000006,timeout:null},{keyi:39,wave:"triangle",time:48.128,timeout:null},{keyi:39,wave:"triangle",time:48.498666666666665,timeout:null},{keyi:41,wave:"triangle",time:49.007999999999996,timeout:null},{keyi:41,wave:"triangle",time:49.37866666666666,timeout:null},{keyi:41,wave:"triangle",time:49.89866666666667,timeout:null},{keyi:41,wave:"triangle",time:50.239999999999995,timeout:null},{keyi:41,wave:"triangle",time:50.848,timeout:null},{keyi:41,wave:"triangle",time:51.16,timeout:null},{keyi:41,wave:"triangle",time:51.760000000000005,timeout:null},{keyi:41,wave:"triangle",time:52.048,timeout:null},{keyi:41,wave:"triangle",time:52.58933333333333,timeout:null},{keyi:39,wave:"triangle",time:52.848,timeout:null},{keyi:39,wave:"triangle",time:53.37866666666666,timeout:null},{keyi:37,wave:"triangle",time:53.72,timeout:null},{keyi:39,wave:"triangle",time:54.25866666666667,timeout:null},{keyi:39,wave:"triangle",time:54.46933333333334,timeout:null},{keyi:36,wave:"triangle",time:57.09866666666666,timeout:null},{keyi:36,wave:"triangle",time:57.33866666666667,timeout:null},{keyi:37,wave:"triangle",time:57.608000000000004,timeout:null},{keyi:37,wave:"triangle",time:58.208,timeout:null},{keyi:37,wave:"triangle",time:58.50933333333333,timeout:null},{keyi:37,wave:"triangle",time:59.087999999999994,timeout:null},{keyi:39,wave:"triangle",time:59.29866666666666,timeout:null},{keyi:39,wave:"triangle",time:59.61866666666667,timeout:null},{keyi:39,wave:"triangle",time:60.01866666666666,timeout:null},{keyi:41,wave:"triangle",time:60.120000000000005,timeout:null},{keyi:37,wave:"triangle",time:60.688,timeout:null},{keyi:41,wave:"triangle",time:61.10933333333334,timeout:null},{keyi:41,wave:"triangle",time:61.72,timeout:null},{keyi:41,wave:"triangle",time:62.05866666666667,timeout:null},{keyi:41,wave:"triangle",time:62.727999999999994,timeout:null},{keyi:43,wave:"triangle",time:63.03999999999999,timeout:null},{keyi:43,wave:"triangle",time:63.367999999999995,timeout:null},{keyi:43,wave:"triangle",time:63.778666666666666,timeout:null},{keyi:43,wave:"triangle",time:64.14933333333333,timeout:null},{keyi:43,wave:"triangle",time:64.928,timeout:null},{keyi:43,wave:"triangle",time:65.30933333333333,timeout:null},{keyi:43,wave:"triangle",time:65.94933333333333,timeout:null},{keyi:44,wave:"triangle",time:66.208,timeout:null},{keyi:44,wave:"triangle",time:66.81866666666667,timeout:null},{keyi:44,wave:"triangle",time:67.16,timeout:null},{keyi:43,wave:"triangle",time:67.54933333333334,timeout:null},{keyi:43,wave:"triangle",time:68.2,timeout:null},{keyi:39,wave:"triangle",time:68.44,timeout:null},{keyi:39,wave:"triangle",time:69.22933333333333,timeout:null},{keyi:32,wave:"triangle",time:69.98933333333333,timeout:null},{keyi:37,wave:"triangle",time:70.96,timeout:null},{keyi:39,wave:"triangle",time:71.30933333333333,timeout:null},{keyi:39,wave:"triangle",time:72.18933333333334,timeout:null},{keyi:39,wave:"triangle",time:73.888,timeout:null},{keyi:37,wave:"triangle",time:74.45866666666666,timeout:null},{keyi:36,wave:"triangle",time:74.62933333333334,timeout:null},{keyi:36,wave:"triangle",time:75.54933333333334,timeout:null},{keyi:36,wave:"triangle",time:77.14933333333333,timeout:null},{keyi:41,wave:"triangle",time:77.72,timeout:null},{keyi:43,wave:"triangle",time:78.09866666666666,timeout:null},{keyi:43,wave:"triangle",time:79.008,timeout:null},{keyi:43,wave:"triangle",time:80.58933333333333,timeout:null},{keyi:39,wave:"triangle",time:81.18933333333334,timeout:null},{keyi:37,wave:"triangle",time:81.42933333333333,timeout:null},{keyi:39,wave:"triangle",time:82.49866666666667,timeout:null},{keyi:37,wave:"triangle",time:82.78933333333333,timeout:null},{keyi:36,wave:"triangle",time:83.08,timeout:null},{keyi:34,wave:"triangle",time:84.328,timeout:null},{keyi:34,wave:"triangle",time:85.13866666666667,timeout:null}],[{keyi:36,wave:"triangle",time:0,timeout:null},{keyi:36,wave:"triangle",time:.3813333333333446,timeout:null},{keyi:37,wave:"triangle",time:.7706666666666706,timeout:null},{keyi:39,wave:"triangle",time:1.1706666666666763,timeout:null},{keyi:39,wave:"triangle",time:1.5413333333333412,timeout:null},{keyi:37,wave:"triangle",time:1.941333333333347,timeout:null},{keyi:36,wave:"triangle",time:2.301333333333332,timeout:null},{keyi:34,wave:"triangle",time:2.650666666666666,timeout:null},{keyi:32,wave:"triangle",time:3.069333333333333,timeout:null},{keyi:32,wave:"triangle",time:3.4693333333333385,timeout:null},{keyi:34,wave:"triangle",time:3.9013333333333264,timeout:null},{keyi:36,wave:"triangle",time:4.25066666666666,timeout:null},{keyi:36,wave:"triangle",time:4.650666666666666,timeout:null},{keyi:34,wave:"triangle",time:5.319999999999993,timeout:null},{keyi:34,wave:"triangle",time:5.52000000000001,timeout:null},{keyi:36,wave:"triangle",time:6.290666666666681,timeout:null},{keyi:36,wave:"triangle",time:6.650666666666666,timeout:null},{keyi:37,wave:"triangle",time:7.039999999999992,timeout:null},{keyi:39,wave:"triangle",time:7.410666666666657,timeout:null},{keyi:39,wave:"triangle",time:7.800000000000011,timeout:null},{keyi:37,wave:"triangle",time:8.181333333333328,timeout:null},{keyi:36,wave:"triangle",time:8.560000000000002,timeout:null},{keyi:34,wave:"triangle",time:8.909333333333336,timeout:null},{keyi:32,wave:"triangle",time:9.309333333333342,timeout:null},{keyi:32,wave:"triangle",time:9.680000000000007,timeout:null},{keyi:34,wave:"triangle",time:10.050666666666672,timeout:null},{keyi:36,wave:"triangle",time:10.421333333333337,timeout:null},{keyi:34,wave:"triangle",time:10.850666666666655,timeout:null},{keyi:32,wave:"triangle",time:11.389333333333326,timeout:null},{keyi:32,wave:"triangle",time:11.581333333333333,timeout:null},{keyi:34,wave:"triangle",time:12.319999999999993,timeout:null},{keyi:34,wave:"triangle",time:12.701333333333338,timeout:null},{keyi:36,wave:"triangle",time:13.109333333333325,timeout:null},{keyi:32,wave:"triangle",time:13.469333333333338,timeout:null},{keyi:34,wave:"triangle",time:13.840000000000003,timeout:null},{keyi:36,wave:"triangle",time:14.199999999999989,timeout:null},{keyi:37,wave:"triangle",time:14.389333333333326,timeout:null},{keyi:36,wave:"triangle",time:14.570666666666654,timeout:null},{keyi:32,wave:"triangle",time:15,timeout:null},{keyi:34,wave:"triangle",time:15.389333333333326,timeout:null},{keyi:36,wave:"triangle",time:15.759999999999991,timeout:null},{keyi:37,wave:"triangle",time:15.981333333333339,timeout:null},{keyi:36,wave:"triangle",time:16.141333333333336,timeout:null},{keyi:34,wave:"triangle",time:16.50933333333333,timeout:null},{keyi:32,wave:"triangle",time:16.869333333333344,timeout:null},{keyi:34,wave:"triangle",time:17.25066666666666,timeout:null},{keyi:27,wave:"triangle",time:17.640000000000015,timeout:null},{keyi:36,wave:"triangle",time:18.439999999999998,timeout:null},{keyi:36,wave:"triangle",time:18.829333333333324,timeout:null},{keyi:37,wave:"triangle",time:19.21066666666667,timeout:null},{keyi:39,wave:"triangle",time:19.629333333333335,timeout:null},{keyi:39,wave:"triangle",time:20,timeout:null},{keyi:37,wave:"triangle",time:20.370666666666665,timeout:null},{keyi:36,wave:"triangle",time:20.72,timeout:null},{keyi:34,wave:"triangle",time:21.090666666666664,timeout:null},{keyi:32,wave:"triangle",time:21.48533333333333,timeout:null},{keyi:32,wave:"triangle",time:21.861333333333334,timeout:null},{keyi:34,wave:"triangle",time:22.221333333333348,timeout:null},{keyi:36,wave:"triangle",time:22.610666666666674,timeout:null},{keyi:34,wave:"triangle",time:23.02133333333333,timeout:null},{keyi:32,wave:"triangle",time:23.581333333333333,timeout:null},{keyi:32,wave:"triangle",time:23.80000000000001,timeout:null}]],initialTime:0,newcss:function(){e.css.innerHTML=`\n #piano-ui {\n background: linear-gradient(transparent, rgba(64, 64, 64, 0.5));\n color: black;\n font-family: Avenir, Klee, Helvetica, Arial, sans-serif;\n font-size: 14px;\n position: fixed;\n height: 75px;\n width: 100%;\n left: 0;\n bottom: 0;\n perspective: 1024px;\n z-index: 9999;\n }\n #piano-quit {\n background: rgba(255, 255, 255, 0.5);\n position: absolute;\n width: 30px;\n top: 0;\n right: 0;\n transform: translateY(-100%);\n border-top: 1px solid rgba(64, 64, 64, 0.5);\n border-radius: 10px 10px 0 0;\n text-align: center;\n cursor: pointer;\n }\n\n .piano-menu {\n height: 100%;\n width: 15%;\n vertical-align: top;\n display: inline-block;\n }\n .piano-menu > label, .piano-menu > input, .piano-menu > select {\n font-size: 14px;\n max-width: 50%;\n float: none;\n }\n #piano-left {\n background: linear-gradient(to right, rgba(255, 255, 255, 0.5), transparent);\n text-align: left;\n }\n #piano-right {\n background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.5));\n text-align: right;\n }\n #piano-middle {\n height: 100%;\n width: 70%;\n bottom: 0;\n transform: translateZ(${e.tilt.value}px) rotateX(${e.tilt.value}deg);\n transform-style: preserve-3d;\n display: inline-block;\n }\n\n .piano-key {\n text-align: center;\n position: relative;\n bottom: 0;\n transform-style: preserve-3d;\n border-radius: 0 0 5px 5px;\n display: inline-block;\n }\n .piano-key:before {\n content: "";\n background: #808080;\n position: absolute;\n height: 100%;\n width: 100%;\n top: 0;\n left: 0;\n transform: translateZ(-6px);\n border-radius: 0 0 5px 5px;\n }\n .piano-white {\n background: white;\n color: black;\n height: 100%;\n width: 3.5%;\n transform: translateZ(7px);\n margin-left: 0.2%;\n }\n .piano-white.piano-hit {\n background: #c0c0c0;\n transform: translateZ(1px);\n }\n .piano-black {\n background: black;\n color: white;\n vertical-align: top;\n height: 70%;\n width: 2%;\n transform: translateX(-55%) translateZ(14px);\n margin-right: -2%;\n }\n .piano-black.piano-hit {\n background: #404040;\n transform: translateX(-55%) translateZ(8px);\n }\n\n .piano-keyval {\n position: absolute;\n bottom: 0;\n transform: translateX(-50%);\n }\n `},newselect:function(e,t,i,l,n,a){l.forEach((function(e){t.appendChild(document.createElement("option")).innerHTML=e})),t.value=l[n],null!=a&&t.addEventListener("input",a),e.appendChild(document.createElement("label")).innerHTML=i,e.appendChild(t)},newrange:function(e,t,i,l,n,a,m,u){t.type="range",t.min=l,t.step=n,t.max=a,t.value=m,t.min=l,t.addEventListener("input",u),e.appendChild(document.createElement("label")).innerHTML=i,e.appendChild(t)},newbutton:function(e,t,i){var l=document.createElement("input");return l.type="button",l.addEventListener("click",i),l.value=t,e.appendChild(l),l},newbr:function(e){e.appendChild(document.createElement("br"))},keyindex:function(t){var i=1==t.key.length?t.key:t.code;return e.keymap.findIndex((e=>e.key==i||e.caps_key==i))},note:function(t,i){var l=e.audio.createGain();l.connect(e.audio.destination);var n=e.audio.createOscillator();n.frequency.value=440*Math.pow(2,(t-53)/12),n.type=i,n.connect(l),n.start();l.gain.exponentialRampToValueAtTime(1/Number.MAX_SAFE_INTEGER,e.audio.currentTime+10),setTimeout((e=>n.disconnect()),1e4),setTimeout((e=>l.disconnect()),1e4)},playDisc:function(t){e.disc[t].forEach((function(t,i){t.timeout=setTimeout((function(){e.note(t.keyi,t.wave);var i=t.keyi-e.pitch.value;i>=0&&i<46&&(e.keymap[i].dom.classList.add("piano-hit"),setTimeout((t=>e.keymap[i].dom.classList.remove("piano-hit")),100)),t.timeout=null}),1e3*t.time)}))},stopDisc:function(t){e.disc[t].forEach((function(e){clearTimeout(e.timeout),e.timeout=null}))},stopDiscs:function(t){e.disc.forEach((e=>e.forEach((function(e){clearTimeout(e.timeout),e.timeout=null}))))},saveDisc:function(){e.disc.push(e.disc[0]),e.deleteDisc(0)},deleteDisc:function(t){0==t?e.disc[t]=[]:e.disc=e.disc.slice(0,t).concat(e.disc.slice(t+1)),e.playbackmode()},exportDiscs:function(){e.disc.forEach((function(e,t){var i=JSON.stringify(e);console.log("Disc "+t+"\n"+i)})),alert("Check the console.")},keyup:function(t){var i=e.keyindex(t);i>=0&&(e.keymap[i].pressed=0,e.keymap[i].dom.classList.remove("piano-hit"))},keydown:function(t){t.preventDefault();var i=e.keyindex(t);if(i>=0&&0==e.keymap[i].pressed){e.keymap[i].pressed=1;var l=i+Number(e.pitch.value);e.note(l,e.wave.value),e.keymap[i].dom.classList.add("piano-hit"),0==e.disc[0].length&&(e.initialTime=e.audio.currentTime),e.disc[0].push({keyi:l,wave:e.wave.value,time:e.audio.currentTime-e.initialTime,timeout:null}),1==e.disc[0].length&&Array.from(e.menuright.getElementsByTagName("input")).slice(0,3).forEach((e=>e.removeAttribute("disabled")))}else" "==t.key?(e.stopDiscs(),e.deleteDisc(0)):"ArrowLeft"==t.key?e.pitch.value=Number(e.pitch.value)-12:"ArrowRight"==t.key?e.pitch.value=Number(e.pitch.value)+12:"ArrowDown"==t.key?(e.tilt.value=Number(e.tilt.value)-5,e.newcss()):"ArrowUp"==t.key&&(e.tilt.value=Number(e.tilt.value)+5,e.newcss())},playstop:function(t,i){if(e.disc[i].length>0){var l=0==i?"↻":i;if(t.target.value==l+" ▶"){e.playDisc(i),t.target.value=l+" ◼";var n=e.disc[i].length-1;setTimeout((e=>t.target.value=l+" ▶"),1e3*e.disc[i][n].time)}else e.stopDisc(i),t.target.value=l+" ▶"}},playbackmode:function(){e.menuright.innerHTML="";var t=e.newbutton(e.menuright,"↻ ▶",(t=>e.playstop(t,0))),i=e.newbutton(e.menuright,"⬇",e.saveDisc);0==e.disc[0].length&&(t.setAttribute("disabled",1),i.setAttribute("disabled",1));var l=e.newbutton(e.menuright,"✖",e.deletionmode);1==e.disc.length&&0==e.disc[0].length&&l.setAttribute("disabled",1);var n=e.newbutton(e.menuright,"︎⬆︎",e.exportDiscs);1==e.disc.length&&n.setAttribute("disabled",1),e.newbr(e.menuright),e.disc.forEach((function(t,i){0!==i&&(e.disc[i].every((e=>null==e.timeout))?e.newbutton(e.menuright,i+" ▶",(t=>e.playstop(t,i))):e.newbutton(e.menuright,i+" ◼",(t=>e.playstop(t,i))))}))},deletionmode:function(){e.stopDiscs(),e.menuright.innerHTML="";var t=e.newbutton(e.menuright,"↻ ✖",(t=>e.deleteDisc(0)));0==e.disc[0].length&&t.setAttribute("disabled",1),e.newbutton(e.menuright,"⬇",e.saveDisc).setAttribute("disabled",1),e.newbutton(e.menuright,"✖",e.playbackmode),e.newbutton(e.menuright,"︎⬆︎",e.exportDiscs).setAttribute("disabled",1),e.newbr(e.menuright),e.disc.forEach((function(t,i){0!==i&&e.newbutton(e.menuright,i+" ✖",(t=>e.deleteDisc(i)))}))},quit:function(){e.ui.remove(),e.css.remove(),e.stopDiscs(),e.audio.close(),document.removeEventListener("keydown",e.keydown),document.removeEventListener("keyup",e.keyup)},init:function(){document.body.appendChild(e.css),document.body.appendChild(e.ui),e.ui.id="piano-ui";var t=document.createElement("div");t.id="piano-quit",t.innerHTML="✕",t.addEventListener("click",e.quit),e.ui.appendChild(t),e.ui.appendChild(e.menuleft),e.menuleft.className="piano-menu",e.menuleft.id="piano-left",e.newselect(e.menuleft,e.wave,"Wave: ",["sine","triangle","square","sawtooth"],1),e.newbr(e.menuleft),e.newrange(e.menuleft,e.pitch,"Pitch: ",0,12,48,24,null),e.newbr(e.menuleft),e.newrange(e.menuleft,e.tilt,"Tilt: ",0,5,90,45,e.newcss),e.newcss(),e.ui.appendChild(e.keyboard),e.keyboard.id="piano-middle";for(var i=0;i<e.keymap.length;i++){var l=e.keymap[i].key,n=e.keymap[i].dom;[0,2,4,5,7,9,11].some((e=>(i-e-8)%12==0))?n.className="piano-key piano-white":n.className="piano-key piano-black";var a=document.createElement("span");a.className="piano-keyval",1==l.length?a.innerHTML=l:a.innerHTML={Tab:"⇥",Backspace:"⌫",ShiftLeft:"⇧L",ShiftRight:"⇧R",Enter:"↵"}[l],n.appendChild(a),e.keyboard.appendChild(n)}e.ui.appendChild(e.menuright),e.menuright.className="piano-menu",e.menuright.id="piano-right",e.playbackmode(),document.addEventListener("keydown",e.keydown),document.addEventListener("keyup",e.keyup)}};e.init()}();
Shows graphs, waterfalls and whatnot of the initial load performance on the current page. (Uses an external script, credit to https://github.com/micmro/performance-bookmarklet)
javascript:(function(){var el=document.createElement('script');el.type='text/javascript';el.src='https://micmro.github.io/performance-bookmarklet/dist/performanceBookmarklet.min.js';el.onerror=function(){alert("Looks like the Content Security Policy directive is blocking the use of bookmarklets\n\nYou can copy and paste the content of:\n\n\"https://micmro.github.io/performance-bookmarklet/dist/performanceBookmarklet.min.js\"\n\ninto your console instead\n\n(link is in console already)");console.log("https://micmro.github.io/performance-bookmarklet/dist/performanceBookmarklet.min.js");};document.getElementsByTagName('body')[0].appendChild(el);})();
Syntax highlight all code elements
javascript: (function() { var colorScheme = 'stackoverflow-light'; var link = document.createElement('link'); link.setAttribute('rel', 'stylesheet'); link.setAttribute('type', 'text/css'); link.setAttribute('href', 'https://rawcdn.githack.com/highlightjs/highlight.js/0c98957206664d2aacd72bbfab4479c216f6da7e/src/styles/' + colorScheme + '.css'); document.getElementsByTagName('head')[0].appendChild(link); var script = document.createElement('script'); script.setAttribute('type', 'text/javascript'); script.setAttribute('src', 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.1.0/highlight.min.js'); document.getElementsByTagName('head')[0].appendChild(script); script.addEventListener('load', function() { var pres = document.querySelectorAll(prompt("Elements to highlight (querySelector)", "pre")); for (var i = 0; i < pres.length; ++i) { if (!pres[i].querySelector('code')) { window.hljs.highlightBlock(pres[i]); } else { window.hljs.highlightBlock(pres[i].querySelectorAll('code')[0]); } } })})()
Finds a DOI on the page of a scientific article and opens a direct link to a PDF of it
javascript:!function(){let e="https://cors.explosionscratc.repl.co/";n=prompt("DOI (if default it's the one found in this page)?",document.documentElement.innerText.match(/(10[.][0-9]{4,}[^\s"/<>]*\/[^\s"<>]+)/)[1]),n&&Promise.any(["sci-hub.ee","sci-hub.st","sci.hubg.org","sci-hub.se","sci-hubtw.hkvisa.net","sci-hub.hkvisa.net","sci-hub.mksa.top"].map((t=>new Promise(((n,s)=>{fetch(`${e}${t}`).then((e=>200===e.status?n(t):s())).catch(s)}))))).then((t=>async function(t,n){console.log({domain:t,doi:n});let s=await fetch(`${e}${t}/${n}`).then((e=>e.text()));return(new DOMParser).parseFromString(s,"text/html").querySelector("iframe, embed").src}(t,n).then(window.open)))}();
Click this bookmarklet on Discord to get nitro emojis for free! (Inserts them as image URLs)
javascript:(function(){javascript:!function(){function e(e){const t=function(){let e,t="undefined"==typeof unsafeWindow?window:unsafeWindow;if(null!=t.webpackChunkdiscord_app){const n=["__extra_id__"];t.webpackChunkdiscord_app.push([n,{},t=>{e=t,n.length=0}])}else{if(null==t.webpackJsonp)return null;delete(e="function"==typeof t.webpackJsonp?t.webpackJsonp([],{__extra_id__:(e,t,n)=>{t.default=n}},["__extra_id__"]).default:t.webpackJsonp.push([[],{__extra_id__:(e,t,n)=>{e.exports=n}},[["__extra_id__"]]])).m.__extra_id__,delete e.c.__extra_id__}const n=t=>{for(let n in e.c)if(e.c.hasOwnProperty(n)){let i=e.c[n].exports;if(!i)continue;if(i.__esModule&&i.default&&(i=i.default),t(i))return i}return null};return{findModule:n,findModuleByUniqueProperties:e=>n(t=>e.every(e=>void 0!==t[e]))}}();if(null==t&&e)return 0;const{findModule:n,findModuleByUniqueProperties:i}=t;let o=i(["getDisambiguatedEmojiContext","searchWithoutFetchingLatest"]);if(null==o&&e)return 0;let l=i(["parse","parsePreprocessor","unparse"]);if(null==l&&e)return 0;let r=i(["useEmojiSelectHandler"]);if(null==r&&e)return 0;const u=o.searchWithoutFetchingLatest;function a(e,t){e.content=e.content.replace(`<${t.animated?"a":""}:${t.originalName||t.name}:${t.id}>`,t.url.split("?")[0]+"?size=48")}o.searchWithoutFetchingLatest=function(){let e=u.apply(this,arguments);return e.unlocked.push(...e.locked),e.locked=[],e};const s=l.parse;l.parse=function(){let e=s.apply(this,arguments);if(0!==e.invalidEmojis.length){for(let t of e.invalidEmojis)a(e,t);e.invalidEmojis=[]}let t=e.validNonShortcutEmojis;for(let n=0;n<t.length;n++){const i=t[n];i.available||(a(e,i),t.splice(n,1),n--)}return e};const c=r.useEmojiSelectHandler;return r.useEmojiSelectHandler=function(e){const{onSelectEmoji:t,closePopout:n}=e,i=c.apply(this,arguments);return function(e,o){if(o.toggleFavorite)return i.apply(this,arguments);const l=e.emoji;null!=l&&(t(l,o.isFinalSelection),o.isFinalSelection&&n())}},1}var t=0;!function n(){0===e()&&window.setTimeout(600==++t?e:n,100,!0)}()}()})()
Upload an image to imgur and get a direct link.
async function getFile(){return showOpenFilePicker().then((e=>e[0].getFile()))}getFile().then((async e=>{if(!e)return alert("No file given");let n=new FormData;n.append("image",e),n.append("title",e.name),fetch("https://api.imgur.com/3/image",{headers:{authorization:"Client-ID 34b90e75ab1c04b"},body:n,method:"POST"}).then((e=>e.json())).then((e=>{e.data.error?alert(`Error uploading: ${e.data.error.message||e.data.error||"[Unknown]"}`):e.data.link?prompt("Image link",e.data.link):(alert("No link found in response, see console for errors."),console.log("Response from Imgur API:",e))}))}));
Draw rectangles on the screen and view their pixel sizes
javascript:(function(){var Event=function(){'use strict';this.attach=function(evtName,element,listener,capture){var evt='',useCapture=(capture===undefined)?true:capture,handler=null;if(window.addEventListener===undefined){evt='on'+evtName;handler=function(evt,listener){element.attachEvent(evt,listener);return listener;};}else{evt=evtName;handler=function(evt,listener,useCapture){element.addEventListener(evt,listener,useCapture);return listener;};}return handler.apply(element,[evt,function(ev){var e=ev||event,src=e.srcElement||e.target;listener(e,src);},useCapture]);};this.detach=function(evtName,element,listener,capture){var evt='',useCapture=(capture===undefined)?true:capture;if(window.removeEventListener===undefined){evt='on'+evtName;element.detachEvent(evt,listener);}else{evt=evtName;element.removeEventListener(evt,listener,useCapture);}};this.stop=function(evt){evt.cancelBubble=true;if(evt.stopPropagation){evt.stopPropagation();}};this.prevent=function(evt){if(evt.preventDefault){evt.preventDefault();}else{evt.returnValue=false;}};};var Dragdrop=function(evt){'use strict';var elem=null,started=0,self=this,moveHandler=null,gWidth=(document.body.scrollWidth>document.documentElement.clientWidth)?document.body.scrollWidth:document.documentElement.clientWidth,gHeight=(document.body.scrollHeight>document.documentElement.clientHeight)?document.body.scrollHeight:document.documentElement.clientHeight,move=function(e){var xDiff=e.clientX-elem.posX,yDiff=e.clientY-elem.posY,x=xDiff-(xDiff%elem.snap)+'px',y=yDiff-(yDiff%elem.snap)+'px';if(started===1){switch(elem.mode){case 0:elem.style.top=y;elem.style.left=x;break;case 1:elem.style.left=x;break;case 2:elem.style.top=y;break;}if(elem.mode!==2){if(xDiff<=elem.minX){elem.style.left=elem.minX+'px';}if(elem.offsetLeft+elem.offsetWidth>=elem.maxX){elem.style.left=(elem.maxX-elem.offsetWidth)+'px';}}if(elem.mode!==1){if(yDiff<=elem.minY){elem.style.top=elem.minY+'px';}if(elem.offsetTop+elem.offsetHeight>=elem.maxY){elem.style.top=(elem.maxY-elem.offsetHeight)+'px';}}elem.onMove(elem);}},start=function(e,src){if(src.className.indexOf('draggable')!==-1){evt.prevent(e);moveHandler=evt.attach('mousemove',document,move,true);started=1;elem=src;elem.posX=e.clientX-elem.offsetLeft;elem.posY=e.clientY-elem.offsetTop;if(elem.mode===undefined){self.set(elem);}elem.onStart(elem);if(elem.setCapture){elem.setCapture();}}},stop=function(){if(started===1){started=0;elem.onStop(elem);evt.detach('mousemove',document,moveHandler);if(elem.releaseCapture){elem.releaseCapture();}}};evt.attach('mousedown',document,start,false);evt.attach('mouseup',document,stop,false);this.set=function(element,elemOptions){var options=elemOptions||{};elem=(typeof element==='string')?document.getElementById(element):element;elem.mode=options.mode||0;elem.minX=options.minX||0;elem.maxX=options.maxX||gWidth;elem.minY=options.minY||0;elem.maxY=options.maxY||gHeight;elem.snap=options.snap||1;elem.onStart=options.onstart||function(){};elem.onMove=options.onmove||function(){};elem.onStop=options.onstop||function(){};elem.style.left=elem.offsetLeft+'px';elem.style.top=elem.offsetTop+'px';elem.unselectable='on';};};var Measurer=function(evt,dragdrop){'use strict';this.enabled=0;var tools=[],i=0,measurer=null,doc=(document.body&&(document.body.scrollLeft||document.body.scrollTop))?document.body:document.documentElement,Tool=function(e,src){var tool=null,info=null,started=0,startX=0,startY=0,resizeHndl=null,x=0,y=0,w=0,h=0,updateInfo=function(x,y,w,h){info.innerHTML='X: '+x+'<br>Y: '+y+'<br>W: '+(w+2)+'<br>H: '+(h+2);},move=function(elem){var x=parseInt(elem.style.left,10),y=parseInt(elem.style.top,10);updateInfo(x,y,w,h);},resize=function(e){if(started===1){w=e.clientX-startX+doc.scrollLeft;h=e.clientY-startY+doc.scrollTop;if(w<=0){w=-w;x=e.clientX+doc.scrollLeft;tool.style.left=x+'px';}if(h<=0){h=-h;y=e.clientY+doc.scrollTop;tool.style.top=y+'px';}tool.style.width=w+'px';tool.style.height=h+'px';updateInfo(x,y,w,h);}},init=function(){if(src.id==='measurer-area'){x=startX=e.clientX+doc.scrollLeft;y=startY=e.clientY+doc.scrollTop;tool=document.createElement('div');tool.style.cssText='position:absolute;top:'+startY+'px;left:'+startX+'px;cursor:crosshair;z-index:9999;background-color:transparent;border:dotted 1px #000;visibility:visible;width:0;height:0';tool.className='draggable';info=document.createElement('div');info.style.cssText='font:12px Arial;padding:3px;position:absolute;top:100%;left:100%;background-color:#C4ECFF;width:55px;height:auto;border: solid 1px #aaa;cursor:crosshair';info.appendChild(document.createTextNode('\xA0'));tool.appendChild(info);document.body.appendChild(tool);evt.prevent(e);updateInfo(x,y,0,0);started=1;resizeHndl=evt.attach('mousemove',document,resize,true);dragdrop.set(tool,{onmove:move});}},stop=function(){if(started===1){started=0;evt.detach('mousemove',document,resizeHndl,true);tool.style.cursor='move';}};this.destroy=function(){if(tool!==null){document.body.removeChild(tool);tool=null;}};init();evt.attach('mouseup',document,stop,false);},render=function(){measurer=document.createElement('div');measurer.id='measurer-area';measurer.style.cssText='position:absolute;top:0;left:0;cursor:crosshair;z-index:9998;background-color:transparent;opacity:0.1;width:'+doc.scrollWidth+'px;height:'+doc.scrollHeight+'px;display:none';document.body.appendChild(measurer);};render();this.enable=function(){measurer.style.display='block';this.enabled=1;};this.disable=function(){measurer.style.display='none';for(i=0;i<tools.length;i+=1){tools[i].destroy();delete tools[i];}tools=[];this.enabled=0;};evt.attach('mousedown',document,function(e,src){if(src.id==='measurer-area'){if(e.shiftKey===false){for(i=0;i<tools.length;i+=1){tools[i].destroy();delete tools[i];}tools=[];}tools.push(new Tool(e,src));}},false);};var evt=new Event(),dragdrop=new Dragdrop(evt);if(window.measurer===undefined){window.measurer=new Measurer(evt,dragdrop);};if(window.measurer.enabled===0){window.measurer.enable();}else{window.measurer.disable();};evt.attach('keydown',document,function(e){if(e.ctrlKey===true&&e.keyCode===77){if(window.measurer.enabled===0){window.measurer.enable();}else{window.measurer.disable();}}else if(e.keyCode===27){window.measurer.disable();}});})()
Open a prompt to screen share then screenshots the result.
javascript:{let e,t=document.createElement("video");function capt(a){streamToData(e,t,a,t.videoWidth,t.videoHeight)}function streamToData(e,t,a=(e=>{let t=document.createElement("img");t.src=e,document.body.appendChild(t)}),d=1920,o=1080){let n=document.createElement("canvas");n.id="auto_generated_canvas",document.body.appendChild(n);var c=n.getContext("2d");n.width=d,n.height=o,c.drawImage(t,0,0,d,o),a(n.toDataURL("image/png")),n.remove()}function downloadURI(e,t){var a=document.createElement("a");a.download=t,a.href=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),delete a}t.autoplay=!0,navigator.mediaDevices.getDisplayMedia({video:!0}).then(a=>{e=a,t.srcObject=e,t.play(),setTimeout(()=>{capt(e=>{downloadURI(e,"Image capture.png")}),e.getTracks().forEach(function(e){e.stop()})},300)})}
Drag to blur rectangles on the screen
javascript: { var x = null; var y = null; rect = null; document.body.style.userSelect = "none"; document.body.style.pointerEvents = "none"; document.addEventListener("mousedown", (e) => { document.addEventListener("mousemove", (e) => { rect.remove(); rect.style.width = `${e.clientX - x}px`; rect.style.height = `${e.clientY - y}px`; document.body.appendChild(rect); }); x = e.clientX; y = e.clientY; rect = document.createElement("DIV"); rect.style.position = "absolute"; rect.style.top = `${e.clientY}px`; rect.style.left = `${e.clientX}px`; rect.style.backdropFilter = "blur(5px)"; rect.style.width = "20px"; rect.style.height = "20px"; rect.style.zIndex = "1000000000"; }); document.addEventListener("mouseup", (e) => { rect.style.width = `${e.clientX - x}px`; rect.style.height = `${e.clientY - y}px`; document.body.appendChild(rect); rect = null; try { document.removeEventListener("mousemove"); } catch (err) {} });}
Click an element to blur it
javascript: { var style = document.createElement("STYLE"); style.innerHTML = `.blur {filter: blur(4px) !important;}`; document.body.appendChild(style); document.addEventListener("click", (e) => { e.preventDefault(); e.stopPropagation(); e.target.classList.toggle("blur"); }); document.addEventListener("mousedown", (e) => { e.preventDefault(); e.stopImmediatePropagation(); }); }
AES encrypt and decrypt a string (loads CryptoJS)
javascript: { let script = document.createElement("SCRIPT"); var password = prompt("Password");script.src = "https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js";script.onload = () => { run(); };document.head.appendChild(script); function run() { var mode = prompt("Mode", "encrypt"); if (!mode) return alert("No mode given"); if (mode.toLowerCase().trim() === "encrypt") { alert(encrypt(prompt("What to encrypt?"))); } else if (mode.toLowerCase().trim() === "decrypt") { alert(decrypt(prompt("What to decrypt?"))); } else { alert("Mode incorrect") } } function encrypt(text) { return (CryptoJS.AES.encrypt(text, password)).toString(); } function decrypt(text) { return (CryptoJS.AES.decrypt(text, password)).toString(CryptoJS.enc.Utf8); }}
Click on Duolingo to translate an english question to french and put the result in the input
javascript:fetch(`https://apis.explosionscratc.repl.co/translate?to=fr&q=${document.querySelector("._11rtD").innerText}`).then(res => res.json()).then(json => document.querySelector("textarea").value = json.text)
Click on Duolingo to translate a question in a foreign language to English and put the result in an input
javascript:fetch(`https://apis.explosionscratc.repl.co/translate?q=${document.querySelector("._11rtD").innerText}`).then(res => res.json()).then(json => document.querySelector("textarea").value = json.text)
Generate an essay based on a prompt such as "George Washington"
javascript:{function _(e){e=e.text,console.log(e),navigator.clipboard.writeText(e),window.open(URL.createObjectURL(new Blob([e],{type:"text/plain"})),"_blank")}let e=escape(prompt("Subject?"));e?fetch("https://cors.explosionscratc.repl.co/www.essaytyper.com/lookup",{method:"POST",body:`subject=${e}`,headers:{"User-Agent":"Mozilla/5.0 (X11; CrOS x86_64 13982.7.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.36 Safari/537.36","X-Requested-With":"XMLHttpRequest","Content-Type":"application/x-www-form-urlencoded"}}).then((e=>e.json())).then(_):alert("No subject given")}
Slightly blur a page (just for fun)
javascript: (d => { var css = `*{filter: blur(.7px)}`, style, id = "dark-theme-snippet", ee = d.getElementById(id); if (null != ee) ee.parentNode.removeChild(ee); else { style = d.createElement('style'); style.type = "text/css"; style.id = id; if (style.styleSheet) style.styleSheet.cssText = css; else style.appendChild(d.createTextNode(css)); (d.head || d.querySelector('head')).appendChild(style); }})(document)
Make the page editable
javascript: document.body.contentEditable = 'true';document.designMode = 'on';void 0
Stop editing the page
javascript: document.body.contentEditable = 'false';document.designMode = 'off';void 0
Replace most words with typo'd versions of them "George Washington was an American military officer, politician, statesman, and Founding Father who served as the first president of the United States from 1789 to 1797." -> "george washaington was a american military offficer, politician, st8sman, adn foundign fatehr who served as teh first president of teh united st8s from 1789 too 1797"
javascript:{var map={merican: "murican",ition:"ishin","they're":"their",their:"they're"," to ":" too ",too:"to",you:"u",the:"teh",its:"it's","it's":"its"," i ":" me ","i'm":"me is",and:"adn",hi:"hai",ff:"fff",this:"tsih",flow:"flwo",ight:"ite",eight:"ate",ate:"8",ing:"ign"," a ":" an "," an ":" a ",were:"we're","we're":"were","'s ":"s ","you're":"your",there:"their",affect:"effect",effect:"affect","could've":"couldve"," dosn't ":" dosen't "," alot ":" a lot "," a lot ":" alot "," loose ":" lose "," lose ":" loose ",tian:"tin",mm:"m",see:"se",ish:"ihs",age:"aeg"};function replace(){for(var e,t=function(){for(var e,t=document.querySelectorAll("body, body *"),o=[],a=0;a<t.length;a++)e=t[a].childNodes[0],t[a].hasChildNodes()&&3==e.nodeType&&o.push(e);return o}(),o=0,a=t.length;o<a;o++)e=t[o].nodeValue,t[o].nodeValue=replaceAll(e)}function replaceAll(e,t=map){var o=new RegExp(Object.keys(t).join("|"),"gim");return e.replace(o,function(e){return t[e.toLowerCase()]}).replace(/[\.]/g,",").toLowerCase()}replace()}
javascript:(t=>{function i(){this.D=function(){const t=h.atan(this.i/this.d);l.save(),l.translate(this.b,this.a),l.rotate(-t),l.scale(this.e,this.e*h.max(1,h.pow(this.j,.7)/15)),l.drawImage(m,-v/2,-v/2),l.restore()}}window;const h=Math,r=h.random,a=document,o=Date.now;e=t=>{l.clearRect(0,0,_,f),l.fill(),requestAnimationFrame(e);const i=.001*y.et;y.r();const s=L.et*g;for(var n=0;n<C.length;++n){const t=C[n];t.i=h.sin(s+t.g)*t.h,t.j=h.sqrt(t.i*t.i+t.f),t.a+=t.d*i,t.b+=t.i*i,t.a>w&&(t.a=-u),t.b>b&&(t.b=-u),t.b<-u&&(t.b=b),t.D()}},s=t=>{for(var e=0;e<p;++e)C[e].a=r()*(f+u),C[e].b=r()*_},n=t=>{c.width=_=innerWidth,c.height=f=innerHeight,w=f+u,b=_+u,s()};class d{constructor(t,e=!0){this._ts=o(),this._p=!0,this._pa=o(),this.d=t,e&&this.s()}get et(){return this.ip?this._pa-this._ts:o()-this._ts}get rt(){return h.max(0,this.d-this.et)}get ip(){return this._p}get ic(){return this.et>=this.d}s(){return this._ts=o()-this.et,this._p=!1,this}r(){return this._pa=this._ts=o(),this}p(){return this._p=!0,this._pa=o(),this}st(){return this._p=!0,this}}const c=a.createElement("canvas");H=c.style,H.position="fixed",H.left=0,H.top=0,H.width="100vw",H.height="100vh",H.zIndex="100000",H.pointerEvents="none",a.body.insertBefore(c,a.body.children[0]);const l=c.getContext("2d"),p=300,g=5e-4,u=20;let _=c.width=innerWidth,f=c.height=innerHeight,w=f+u,b=_+u;const v=15.2,m=a.createElement("canvas"),E=m.getContext("2d"),x=E.createRadialGradient(7.6,7.6,0,7.6,7.6,7.6);x.addColorStop(0,"hsla(255,255%,255%,1)"),x.addColorStop(1,"hsla(255,255%,255%,0)"),E.fillStyle=x,E.fillRect(0,0,v,v);let y=new d(0,!0),C=[],L=new d(0,!0);for(var j=0;j<p;++j){const t=new i;t.a=r()*(f+u),t.b=r()*_,t.c=1*(3*r()+.8),t.d=.1*h.pow(t.c,2.5)*50*(2*r()+1),t.d=t.d<65?65:t.d,t.e=t.c/7.6,t.f=t.d*t.d,t.g=r()*h.PI/1.3,t.h=15*t.c,t.i=0,t.j=0,C.push(t)}s(),EL=a.addEventListener,EL("visibilitychange",(()=>setTimeout(n,100)),!1),EL("resize",n,!1),e()})();
View the source code of an extensions webstore extension. Click this on an extension page such as https://chrome.google.com/webstore/detail/tab-grouper/ebaakekgcpaojdlfcfmlaelgaacmdeje.
void(location=`https://robwu.nl/crxviewer/?crx=${escape(location.href)}`)
Click on elements to start making them spin around, credit to @SheepTester on GitHub
javascript:{if("twirl"!=s&&"shake"!=s){var s=document.createElement("style");s.type="text/css",s.appendChild(document.createTextNode("@keyframes shake{0%{transform:translate(-5px,-5px);}25%{transform:translate(5px,-5px);}50%{transform:translate(5px,5px);}75%{transform:translate(-5px,5px);}100%{transform:translate(-5px,-5px);}}@keyframes twirl{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}#TWIRLIE{background:#333;color:white;display:block;position:fixed;bottom:0;left:0;margin:5px;padding:5px 10px;border-radius:5px;-webkit-user-select:none;font-size:12px;}#TWIRLIE:hover{background:#424242;}#TWIRLIE:active{background:#212121;}#TWIRLIECLOSE{background:#f44336;border:none;color:white;font-family:inherit;font-size:inherit;display:inline-block;}#TWIRLIECLOSE:hover{background:#ef5350;}#TWIRLIECLOSE:active{background:#e53935;}")),document.head.appendChild(s),(s=document.createElement("div")).id="TWIRLIE",s.innerHTML='Toggle twirl/shake <strong>twirl</strong> <button id="TWIRLIECLOSE">Close</button>',document.body.appendChild(s),s="twirl";var TWIRLIE=function(t){return"TWIRLIE"==t.target.id?(s="twirl"==s?"shake":"twirl",t.target.querySelector("strong").innerHTML=s):"TWIRLIECLOSE"==t.target.id?(document.body.removeEventListener("click",TWIRLIE),document.body.removeChild(document.querySelector("#TWIRLIE"))):"shake"==s?"shake .1s linear infinite"==t.target.style.animation?t.target.style.animation="":t.target.style.animation="shake .1s linear infinite":"twirl 1s linear infinite"==t.target.style.animation?t.target.style.animation="":t.target.style.animation="twirl 1s linear infinite","inline"==(t.target.currentStyle?t.target.currentStyle:getComputedStyle(t.target,null)).display&&(t.target.style.display="inline-block"),t.stopImmediatePropagation(),t.preventDefault(),!1};document.body.addEventListener("click",TWIRLIE)}}
Make the webpage look 3d by popping out elements and then allow rotation with the mouse (super cool)
javascript:!function(){var e={menu:document.createElement("div"),limit:document.createElement("input"),gap:document.createElement("input"),sag:document.createElement("input"),fov:document.createElement("input"),flo:document.createElement("input"),off:document.createElement("input"),non:document.createElement("input"),end:document.createElement("input"),tgl:document.createElement("input"),cssStatic:document.createElement("style"),cssDynamic:document.createElement("style"),orientation:{yaw:0,pitch:0,roll:0},mouseMove:function(t){e.orientation.yaw=180*-Math.cos(Math.PI*t.clientX/innerWidth)*e.limit.value,e.orientation.pitch=180*Math.cos(Math.PI*t.clientY/innerHeight)*e.limit.value,e.updateBody()},gyroMove:function(t){innerWidth>innerHeight?(e.orientation.yaw=-(t.alpha+t.beta),e.orientation.pitch=t.gamma-90*Math.sign(90-Math.abs(t.beta))):(e.orientation.yaw=-(t.alpha+t.gamma),e.orientation.pitch=t.beta-90),e.updateBody()},updateOrigin:function(e){document.body.style.transformOrigin=innerWidth/2+pageXOffset+"px "+(innerHeight/2+pageYOffset)+"px"},updateBody:function(){document.body.style.transform="perspective("+Math.pow(2,e.fov.value)+"px) translateZ(-"+e.gap.value+"px) rotateX("+e.orientation.pitch+"deg) rotateY("+e.orientation.yaw+"deg)"},updateCSS:function(){if(e.non.checked)e.cssDynamic.innerHTML="";else if(e.off.checked)e.cssDynamic.innerHTML="* { transform-style: preserve-3d; }";else{for(var t=0;document.querySelector("body"+" > *".repeat(t));t++);var n=e.gap.value/t,o=-Math.PI*e.sag.value/t;e.cssDynamic.innerHTML=`* {transform: translateZ(${n}px) rotateX(${o}rad);transform-style: preserve-3d;transition: transform 1s;outline: 1px solid rgba(0, 0, 0, 0.0625);${e.flo.checked?"overflow: visible !important;":""}}*:hover {transform: translateZ(${2*n}px) rotateX(${2*o}rad);${e.flo.checked?"":"overflow: visible;"}}`}},toggle:function(){"active"==e.menu.className?e.menu.removeAttribute("class"):e.menu.className="active"},quit:function(){window.removeEventListener("deviceorientation",e.gyroMove),window.removeEventListener("mousemove",e.mouseMove),window.removeEventListener("scroll",e.updateOrigin),window.addEventListener("resize",e.updateOrigin),e.menu.remove(),e.cssStatic.remove(),e.cssDynamic.remove(),document.body.removeAttribute("style")},newRange:function(t,n,o,i,a,r,d){e.menu.appendChild(t),t.type="range",t.min=o,t.max=a,t.step=i,t.value=r,t.addEventListener("input",d),e.menu.appendChild(document.createElement("span")).innerHTML=n,e.menu.appendChild(document.createElement("br"))},newCheckbox:function(t,n,o){e.menu.appendChild(t),t.type="checkbox",t.addEventListener("click",o),e.menu.appendChild(document.createElement("span")).innerHTML=n,e.menu.appendChild(document.createElement("br"))},newButton:function(t,n,o){e.menu.appendChild(t),t.type="button",t.value=n,t.addEventListener("click",o)},init:function(){document.body.parentNode.appendChild(e.menu).id="tri-menu",e.newRange(e.limit,"limit",0,.03125,1,.125,e.updateBody),e.newRange(e.gap,"gap / distance",0,32,512,128,(function(){e.updateCSS(),e.updateBody()})),e.newRange(e.sag,"sag",-.25,.03125,.25,0,e.updateCSS),e.newRange(e.fov,"field of view",7,1,13,10,e.updateBody),e.newCheckbox(e.flo,"force overflow",e.updateCSS),e.flo.setAttribute("checked",""),e.newCheckbox(e.off,"flatten layers",e.updateCSS),e.newCheckbox(e.non,"flatten everything",e.updateCSS),e.newButton(e.end,"Quit",e.quit),e.newButton(e.tgl,"⚙️",e.toggle),e.tgl.id="tri-toggle",e.menu.appendChild(e.cssStatic).innerHTML="html, body {transition-property: none;height: 100%;width: 100%;}html, html:hover, #tri-menu, #tri-menu > *, #tri-menu > *:hover {transform: none;outline: none;overflow: auto !important;float: none;}#tri-menu {position: fixed;top: 0;left: 0;background: rgba(0, 0, 0, 0.5);color: white;border: 1px solid rgba(255, 255, 255, 0.5);;border-radius: 0 0 16px 0;padding: 8px;transform: translate(-100%, -100%) translate(32px, 32px);}#tri-menu.active {transform: none;}#tri-toggle {position: absolute;bottom: 0;right: 0;height: 32px;width: 32px;background: transparent;color: white;border: none;cursor: pointer;}#tri-menu.active > #tri-toggle {background: white;color: black;border-radius: 8px 0 0 0;}",e.menu.appendChild(e.cssDynamic),e.updateCSS(),window.addEventListener("deviceorientation",e.gyroMove),window.addEventListener("mousemove",e.mouseMove),window.addEventListener("scroll",e.updateOrigin),window.addEventListener("resize",e.updateOrigin),window.scrollBy(0,1)}};e.init()}();
Answer any question using a combination of google searching, britanica API, duckduckgo, and Wolfram Alpha. Ask stuff like "Who was president in 1953" or "Did george washington have a son" or "translate hello to french"
javascript:!async function(){var o=prompt("What do you want to know?");console.log("Searching for",o);var e=await async function(e){e=await fetch(`https://cors.explosionscratc.repl.co/google.com/search?q=${encodeURI(e)}`,{headers:{"User-Agent":"Mozilla/5.0 (X11; CrOS x86_64 13982.88.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.162 Safari/537.36"}}).then(e=>e.text());window.d=(new DOMParser).parseFromString(e,"text/html");e=(d.querySelector("[id*='lrtl-translation-text']")||[...d.querySelectorAll(".kp-header [data-md]")][1]||[...document.querySelectorAll(".kCrYT")]?.[1]||[...d.querySelectorAll("*")].filter(e=>e.innerText).filter(e=>e.innerText.includes("Calculator Result")).slice(-2)?.[0]?.innerText?.split("\n")?.[2]||[...d.querySelectorAll("*")].filter(e=>e.innerText).filter(e=>e.innerText.includes("Featured snippet from the web")||e.innerText.includes("Description")||e.innerText.includes("Calculator result")).slice(-1)?.[0]?.parentElement.querySelector("div span")||d.querySelector(".card-section, [class*='__wholepage-card'] [class*='desc']")||d.querySelector(".thODed")?.querySelector("div span")||[...d.querySelectorAll("[data-async-token]")]?.slice(-1)?.[0]||d.querySelector("miniapps-card-header")?.parentElement||d.querySelector("#tw-target"))?.innerText?.trim();e.includes("translation")&&e.includes("Google Translate")&&(e=e.split("Verified")[0].trim());e.includes("Calculator Result")&&e.includes("Your calculations and results")&&(e=e.split("them")?.[1].split("(function()")?.[0]?.split("=")?.[1]?.trim());return e}(o);if(e)return alert(e);fetch(`https://chatbot.api.eb.com/api/qna?search_string=${o}`,{headers:{"x-api-key":"YH4dIgRoMX77z56YfLcz24aur7nONAEI6lziQKpX"},method:"GET"}).then(e=>e.json()).then(async e=>{if(e.longAnswer)return console.log("Got Britannica answer",e),prompt(e.longAnswer+"\n\n Answer from Britannica",`https://www.britannica.com${e.mendelResults[0].url}`);if(console.log("No britanica answer"),!(t=await fetch(`https://apis.explosionscratc.repl.co/quick-answer?q=${encodeURIComponent(o)}`).then(e=>e.json())).error)return console.log("Got wolfram alpha answer",t),alert(t.text+"\n\n Answer from Wolfram Alpha AI");console.log("No wolfram alpha answer");var t=await fetch(`https://cors.explosionscratc.repl.co/duckduckgo.com/?q=${encodeURIComponent(o)}&format=json`).then(e=>e.json()),e=t.Answer||t.Abstract||t.Definition||(t.RelatedTopics.length?t.RelatedTopics[0].Text:{});return e&&"object"!=typeof e?(console.log("Got duckduckgo answer",t,e),t.Abstract&&t.AbstractURL&&t.AbstractURL,alert(e+"\n\n Answer from DuckDuckGo")):(console.log("No duckduck go answer"),"en"!==(t=await fetch(`https://apis.explosionscratc.repl.co/translate?q=${encodeURIComponent(o)}`).then(e=>e.json())).src?(console.log("Got google translate answer",t),alert(t.text+"\n\n Answer from Google Translate")):(console.log("No google translate answer"),(t=await fetch(`https://apis.explosionscratc.repl.co/google?q=${encodeURIComponent(o)}`).then(e=>e.json())).length?(console.log("Got google search result answer",t),prompt(`No quick answer found, first search result: \n${t[0].snippet}`,t[0].link)):void 0))})}();
Rephrases the selected text using the wordtune demo API.
javascript:function rewrite(e){return new Promise((async(t,r)=>{var{suggestions:n,error_code:o,error_msg:a,error_msg_extra:i}=await fetch("https://api.wordtune.com/rewrite-limited",{headers:{accept:"*/*","accept-language":"en-US,en;q=0.9","content-type":"application/json","x-wordtune-origin":"https://www.wordtune.com"},referrer:"https://www.wordtune.com/",body:JSON.stringify({action:"REWRITE",text:e,start:0,end:e.length,selection:{wholeText:e,start:0,end:e.length}}),method:"POST"}).then((e=>e.json()));o||a||i?r({code:o,message:a,message_extra:i}):t(n)}))}rewrite(prompt("What to rephrase?",window.getSelection().toString())).then((e=>{let t=e.sort(((e,t)=>t.length-e.length))[0];prompt("Rephrased: ",t),navigator.clipboard.writeText(t)}));
If on a scratch page opens the current scratch project in turbowarp (with high quality pen, interpolation and 60fps)
javascript:url=window.location.href;window.open("https://turbowarp.org/"+url.substring(33)+"fullscreen?offscreen&hqpen&interpolate&fps=60")
Scrambles all the words on the page so "page" might become "aepg"
javascript:{function n(n){var t=n.split(/[^a-zA-Z0-9\n\t]/);for(let n=0;n<t.length;n++){const e=t[n];e.length>=3&&(t[n]=e[0]+o(e.substr(1,e.length-2))+e[e.length-1])}return t.join(" ")||""}function o(n){for(var o=n.split(""),t=o.length-1;t>0;t--){var e=Math.floor(Math.random()*(t+1)),l=o[t];o[t]=o[e],o[e]=l}return o.join("")}!function(){for(var o,t=function(){for(var n,o=document.querySelectorAll("body, body *"),t=[],e=0;e<o.length;e++)n=o[e].childNodes[0],o[e].hasChildNodes()&&3==n.nodeType&&t.push(n);return t}(),e=0,l=t.length;e<l;e++)o=t[e].nodeValue,console.log(n(o)),t[e].nodeValue=n(o)}()};
Take screenshots by pressing shift on Littlebigsnake.com while playing. (Opens a new window with the screenshots with the option to download/copy them)
javascript:!function(){"use strict";var e=window.open("","_blank");if(!e)return n('<svg style="margin-right: 5px;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--iconoir" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><g stroke-width="1.5" fill="none"><path d="M20.043 21H3.957c-1.538 0-2.5-1.664-1.734-2.997l8.043-13.988c.77-1.337 2.699-1.337 3.468 0l8.043 13.988C22.543 19.336 21.58 21 20.043 21z" stroke="currentColor" stroke-linecap="round"></path><path d="M12 9v4" stroke="currentColor" stroke-linecap="round"></path><path d="M12 17.01l.01-.011" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></g></svg> Oops! Please allow popups then try again!',3e3,"#f27474");function n(e,n=1e3,t="#3fc3ee"){let o=document.createElement("div");o.className="toast",o.innerHTML=e,o.setAttribute("style",`\n padding: 9px;\n border-radius: .3rem;\n background: ${t};\n color: white;\n box-shadow: 3px 10px 7px -7px rgba(0,0,0,0.05);\n display: flex;\n align-items: center;\n position: absolute;\n right: 3px;\n bottom: -100px;\n transition: opacity .3s ease, bottom .2s ease;\n `),requestAnimationFrame((()=>o.style.bottom="3px")),document.body.appendChild(o),setTimeout((()=>{o.style.opacity=0,setTimeout((()=>o.remove()),350)}),n)}n('<svg style="margin-right: 5px;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--ph" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M177.787 98.476a8 8 0 0 1-.264 11.31l-58.666 56a8 8 0 0 1-11.047.001l-29.334-28a8 8 0 1 1 11.047-11.574l23.81 22.728l53.143-50.728a8 8 0 0 1 11.31.263zM232 128A104 104 0 1 1 128 24a104.118 104.118 0 0 1 104 104zm-16 0a88 88 0 1 0-88 88a88.1 88.1 0 0 0 88-88z" fill="currentColor"></path></svg> It\'s working! Just press shift to take a screenshot in game!',3e3),e.document.title="📷 Screenshots! 🐍",window.DOC_WIN=e,e.document.body.innerHTML='<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.15/tailwind.min.css">\n <div class="container mx-auto">\n <div id="grid" class="empty grid-cols-3 p-20 space-y-2 lg:space-y-0 lg:grid lg:gap-3 lg:grid-rows-3"></div>\n </div>\n <style>\n #grid.empty::after {\n content: "Images will appear here!";\n display: block;\n color: #333;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n font-size: 30px;\n font-weight: 150;\n }\n div > div > div {\n overflow: hidden;\n }\n img {\n cursor: pointer;\n transition: transform 1s ease, box-shadow .3s ease;\n }\n div > div > div > img:hover {\n transform: scale(1.2);\n transform-origin: center;\n }\n button {\n display: none;\n }\n\n .large {\n position: fixed;\n background: #000a;\n backdrop-filter: blur(4px);\n width: 100vw;\n height: 100vh;\n top: 0;\n left: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n padding: 20px;\n }\n .large img {\n cursor: auto;\n max-height: 80%;\n }\n .large img:hover {\n transform: none;\n }\n .large .buttons {\n display: flex;\n margin-top: 10px;\n width: clamp(200px, 80vw, 400px)\n }\n .large button {\n transition: all .3s ease;\n display: flex;\n flex: 1;\n padding: 8px;\n background: #fff3;\n margin: 3px;\n justify-content: center;\n align-items: center;\n border-radius: 4px;\n }\n .large button:hover {\n background: white;\n }\n .large button:active {\n transform: scale(.99);\n }\n .large button svg {\n margin-right: 10px;\n }\n </style>\n ',e.eval(`(${()=>{window.addImg=function(n){var t=document.createElement("div");t.classList.add("buttons"),t.innerHTML='\n <button class="download"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><g fill="none"><path d="M12 15V3m0 12l-4-4m4 4l4-4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M2 17l.621 2.485A2 2 0 0 0 4.561 21H19.439a2 2 0 0 0 1.94-1.515L22 17" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></g></svg>Download</button>\n <button class="copy"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><g fill="none"><path d="M8 4v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7.242a2 2 0 0 0-.602-1.43L16.083 2.57A2 2 0 0 0 14.685 2H10a2 2 0 0 0-2 2z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M16 18v2a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h2" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></g></svg>Copy</button>\n ';var o=new Image;o.src=n;var i=document.createElement("div");i.setAttribute("class","w-full rounded"),i.appendChild(o),i.appendChild(t),document.querySelector("#grid").appendChild(i),document.querySelector("#grid").classList.remove("empty"),o.onclick=function n(t){return async()=>{var o=t.parentElement;console.log(o),o.classList.add("large");var i=await async function(e){return await fetch(e).then((e=>e.blob()))}(t.src);o.querySelector("button.download").onclick=()=>{e(i,"image.png")},o.querySelector("button.copy").onclick=()=>{navigator.clipboard.write([new ClipboardItem({"image/png":i})])},setTimeout((()=>{o.onclick=()=>{o.classList.remove("large"),o.onclick=()=>{},t.onclick=n(t)}}),50)}}(o)};var e=function(e,n){var t=document.createElement("a");document.body.appendChild(t),t.style="display: none";var o=window.URL.createObjectURL(e);t.href=o,t.download=n,t.click(),window.URL.revokeObjectURL(o),t.remove()}}})()`),window.onkeyup=e=>{"Shift"===e.key&&(e.preventDefault(),e.stopPropagation(),console.log("Screenshotting"),window.requestAnimationFrame((function(){var e;window.DOC_WIN.addImg(document.getElementById("#canvas").toDataURL()),e=()=>{document.title="🎉 Took a screenshot!",setTimeout((()=>document.title="📷 Screenshots! 🐍"),500)},window.DOC_WIN.eval(`(${e})()`)})),n('<svg style="margin-right: 5px;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--ph" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M177.787 98.476a8 8 0 0 1-.264 11.31l-58.666 56a8 8 0 0 1-11.047.001l-29.334-28a8 8 0 1 1 11.047-11.574l23.81 22.728l53.143-50.728a8 8 0 0 1 11.31.263zM232 128A104 104 0 1 1 128 24a104.118 104.118 0 0 1 104 104zm-16 0a88 88 0 1 0-88 88a88.1 88.1 0 0 0 88-88z" fill="currentColor"></path></svg>'))}}();
Use a google custom search engine I made to search for old forum posts relating to the query. Useful for finding duplicate suggestions.
javascript:(function() { var targetUrl = "https://cse.google.com/cse?cx=004750568343869157003:8dr5wusgvjk&q="; new Promise ( (setQuery) => {var input = window.prompt("What are you searching for?"); if (input) setQuery(input);} ) .then ( (query) => window.open(targetUrl + query) );})();
Adds tooltips to every link element so that when hovered they show the link destination in the tooltip.
javascript: (function () { function insertcss() { var t = document.createElement("STYLE"); (t.innerHTML = '.qtip{display:inline-block;position:relative;cursor:pointer;border-bottom:.05em dotted #3bb4e5;box-sizing:border-box;font-style:normal;transition:all .25s ease-in-out}.qtip:hover{color:#069;border-bottom:.05em dotted #069}.qtip:before{background:rgba(0,0,0,.85);box-shadow:0 1px 3px rgba(0,0,0,.3);text-shadow:1px 1px 1px rgba(0,0,0,.5)}.dark-mode .qtip:before{background:rgba(87,87,87,.5);box-shadow:0 1px 3px rgba(219,219,219,.3);text-shadow:0 0 3px rgba(255,255,255,.5)}.qtip{--tooltip-color:rgba(0, 0, 0, 0.85)}.qtip{--tooltip-color:rgba(87, 87, 87, 0.5)}.qtip:before{content:attr(data-tip);font-size:14px;position:absolute;color:#fff;line-height:1.2em;padding:.5em;font-style:normal;min-width:120px;text-align:center;opacity:0;visibility:hidden;transition:all .3s ease-in-out;font-family:sans-serif;letter-spacing:0;font-weight:600}.qtip:after{width:0;height:0;border-style:solid;content:"";position:absolute;opacity:0;visibility:hidden;transition:all .3s ease-in-out}.qtip:hover:after,.qtip:hover:before{visibility:visible;opacity:1}.qtip.tip-top:before{top:0;left:50%;transform:translate(-50%,calc(-100% - 8px));box-sizing:border-box;border-radius:3px}.qtip.tip-top:after{border-width:8px 8px 0 8px;border-color:var(--tooltip-color) transparent transparent transparent;top:-8px;left:50%;transform:translate(-50%,0)}.qtip.tip-bottom:before{bottom:0;left:50%;transform:translate(-50%,calc(100% + 8px));box-sizing:border-box;border-radius:3px}.qtip.tip-bottom:after{border-width:0 8px 8px 8px;border-color:transparent transparent var(--tooltip-color) transparent;bottom:-8px;left:50%;transform:translate(-50%,0)}.qtip.tip-left:before{left:0;top:50%;transform:translate(calc(-100% - 8px),-50%);box-sizing:border-box;border-radius:3px}.qtip.tip-left:after{border-width:8px 0 8px 8px;border-color:transparent transparent transparent var(--tooltip-color);left:-8px;top:50%;transform:translate(0,-50%)}.qtip.tip-right:before{right:0;top:50%;transform:translate(calc(100% + 8px),-50%);box-sizing:border-box;border-radius:3px}.qtip.tip-right:after{border-width:8px 8px 8px 0;border-color:transparent var(--tooltip-color) transparent transparent;right:-8px;top:50%;transform:translate(0,-50%)}'), document.body.appendChild(t); } function replacelinks() { for (var t = document.querySelectorAll("a"), r = 0; r < t.length; r++) { var o = t[r].innerHTML, e = t[r].getAttribute("href"); t[r].innerHTML = `<i class="qtip tip-top" data-tip="${e}">${o}</i>`; } } insertcss(); replacelinks();})();
Downloads a YouTube video using a yt-dl API I made.
javascript: {var url=window.location.href;if(/https:\/\/(www|)\.youtube\.com\/watch\?v=[A-Za-z0-9]+/i.test(url)){var newurl=`https://youtube-downloader.explosionscratc.repl.co/download?URL=${url}&format=${prompt("What format would you like to download?","mp4")||"cancel"}&quality=${prompt("What quality would you like to download? (highest, lowest, highestaudio, lowestaudio, highestvideo, lowestvideo)","highest")||"cancel"}`;newurl.includes("cancel")?alert("You canceled the download"):window.location.href=newurl}else alert("You aren't on a YouTube page");}
Open the current GitHub repository in Gitpod, an online VSCode IDE
javascript:window.location.href =`https://gitpod.io#${window.location.href}`
Beautifies a JSON page, for example from an API response.
javascript: !(() => {document.querySelector("pre").innerText = JSON.stringify(JSON.parse(document.querySelector("pre").innerText), null, 2)})()
Copies the GitHack CDN URL to the current GitHub file you're viewing.
javascript: { function url(r) { const o = [ [ /^(https?):\/\/gitlab\.com\/([^\/]+.*\/[^\/]+)\/(?:raw|blob)\/(.+?)(?:\?.*)?$/i, "$1://gl.githack.com/$2/raw/$3", ], [ /^(https?):\/\/bitbucket\.org\/([^\/]+\/[^\/]+)\/(?:raw|src)\/(.+?)(?:\?.*)?$/i, "$1://bb.githack.com/$2/raw/$3", ], [ /^(https?):\/\/bitbucket\.org\/snippets\/([^\/]+\/[^\/]+)\/revisions\/([^\/\#\?]+)(?:\?[^#]*)?(?:\#file-(.+?))$/i, "$1://bb.githack.com/!api/2.0/snippets/$2/$3/files/$4", ], [ /^(https?):\/\/bitbucket\.org\/snippets\/([^\/]+\/[^\/\#\?]+)(?:\?[^#]*)?(?:\#file-(.+?))$/i, "$1://bb.githack.com/!api/2.0/snippets/$2/HEAD/files/$3", ], [ /^(https?):\/\/bitbucket\.org\/\!api\/2.0\/snippets\/([^\/]+\/[^\/]+\/[^\/]+)\/files\/(.+?)(?:\?.*)?$/i, "$1://bb.githack.com/!api/2.0/snippets/$2/files/$3", ], [ /^(https?):\/\/api\.bitbucket\.org\/2.0\/snippets\/([^\/]+\/[^\/]+\/[^\/]+)\/files\/(.+?)(?:\?.*)?$/i, "$1://bb.githack.com/!api/2.0/snippets/$2/files/$3", ], [ /^(https?):\/\/(?:cdn\.)?rawgit\.com\/(.+?\/[0-9a-f]+\/raw\/(?:[0-9a-f]+\/)?.+)$/i, "$1://gist.githack.com/$2", ], [ /^(https?):\/\/(?:cdn\.)?rawgit\.com\/([^\/]+\/[^\/]+\/[^\/]+|[0-9A-Za-z-]+\/[0-9a-f]+\/raw)\/(.+)/i, "$1://raw.githack.com/$2/$3", ], [ /^(https?):\/\/raw\.github(?:usercontent)?\.com\/([^\/]+\/[^\/]+\/[^\/]+|[0-9A-Za-z-]+\/[0-9a-f]+\/raw)\/(.+)/i, "$1://raw.githack.com/$2/$3", ], [ /^(https?):\/\/github\.com\/(.[^\/]+?)\/(.[^\/]+?)\/(?!releases\/)(?:(?:blob|raw)\/)?(.+?\/.+)/i, "$1://raw.githack.com/$2/$3/$4", ], [ /^(https?):\/\/gist\.github(?:usercontent)?\.com\/(.+?\/[0-9a-f]+\/raw\/(?:[0-9a-f]+\/)?.+)$/i, "$1://gist.githack.com/$2", ], [ /^(https?):\/\/git\.sr\.ht\/(~[^\/]+\/[^\/]+\/blob\/.+\/.+)/i, "$1://srht.githack.com/$2", ], [ /^(https?):\/\/hg\.sr\.ht\/(~[^\/]+\/[^\/]+\/raw\/.+)/i, "$1://srhgt.githack.com/$2", ], ]; function $(t) { return t.replace(/^(\w+):\/\/(\w+)/, "$1://$2cdn"); } return new Promise((i) => { var e, a, s, t, c = (function (t) { for (var i in o) { var [e, i] = o[i]; if (e.test(t)) return t.replace(e, i); } })(r); c && ((a = c.match( /^(\w+:\/\/(raw).githack.com\/([^\/]+)\/([^\/]+))\/([^\/]+)\/(.*)/i )) ? "raw" === a[2] && ((s = c), (t = `https://api.github.com/repos/${a[3]}/${a[4]}/git/refs/heads/${a[5]}`), fetch(t) .then((t) => { if (t.ok) return t.json(); }) .then((t) => { (t = t && t.object && t.object.sha ? t.object.sha : a[5]), (e = $(`${a[1]}/${t}/${a[6]}`)), i({ prod: e, dev: s }); })) : ((e = $((s = c))), setValid())); }); } const a = function (a, t) { var i = new Promise((t, i) => { let e = setTimeout(() => { clearTimeout(e), i("Timed out in " + a + "ms."); }, a); }); return Promise.race([t, i]); }, b = (t) => { var i = document.createElement("textarea"); return ( (i.value = t), document.body.appendChild(i), i.select(), document.execCommand("copy"), i.remove(), t ); }; a(1e3, url(location.href)) .then((t) => b(t.prod)) .catch((t) => alert("Couldn't get CDN url")); }
Highlights internal and external links, external: blue, red: internal, orange: the same URL
javascript:!function(){var n,t;for(n=0;t=document.links[n];++n)t.style.color=["blue","red","orange"][e(t,location)];function e(n,t){return n.hostname!=t.hostname?0:a(n.pathname)!=a(t.pathname)||n.search!=t.search?1:2}function a(n){return(n=("/"==n.charAt(0)?"":"/")+n).split("?")[0]}}();
Copies the IEEE citation for a given DOI. (Edit the code to change the citation format, see all at citation.crosscite.org)
javascript:function d(){var t=prompt("Enter a DOI (this should be something like '10.1234/example')");if(!t)return alert("No DOI given.");fetch(`https://citation.crosscite.org/format?doi=${t}&style=ieee&lang=en-US`).then(e=>e.text()).then(e=>{!function(e){const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t);var o=0<document.getSelection().rangeCount&&document.getSelection().getRangeAt(0);t.select(),document.execCommand("copy"),document.body.removeChild(t),o&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(o))}(`https://libkey.io/libraries/519/articles/${encodeURIComponent(`doi:${t}`)}/full-text-file`),prompt("Copied URL to clipboard, here is the citation.",e.replace(/\[[0-9]+\]/,""))})}d();
Deletes all cookies that are available to client side JavaScript.
javascript: (function() {C = document.cookie.split("; ");for (d = "." + location.host; d; d = ("" + d).substr(1).match(/\..*$/))for (sl = 0; sl < 2; ++sl)for (p = "/" + location.pathname; p; p = p.substring(0, p.lastIndexOf('/')))for (i in C)if (c = C[i]) {document.cookie = c + "; domain=" + d.slice(sl) + "; path=" + p.slice(1) + "/" + "; expires=" + new Date((new Date).getTime() - 1e11).toGMTString()}})()
Creates a draggable screen ruler/measurer that shows width height, position, etc
javascript:void;marqueeColor=prompt('Marquee Color:','red');initMarquee=document.createElement('div');marquee=document.body.appendChild(initMarquee);marquee.style.position='absolute';marquee.style.border='dashed 1px red';initControls=document.createElement('div');controls=document.body.appendChild(initControls);controls.style.position='absolute';controls.style.top='-300px';controls.style.left='-300px';controls.style.width='85px';controls.style.background='%23eee';controls.style.padding='5px';controls.style.border='solid 1px %23ccc';controls.style.font='10px verdana,sans-serif';controls.style.width='85px';controls.style.zIndex='99';controls.innerHTML='<b>Current:</b><br> x:<span id="currentX">0</span> y:<span id="currentY">0</span><br><b>Begin:</b><br> x:<span id="beginX">0</span> y:<span id="beginY">0</span><br><b>End:</b><br> x:<span id="endX">0</span> y:<span id ="endY">0</span><br><b>Dimensions:</b><br> w:<span id="dimX">0</span> h:<span id="dimY">0</span>';document.onmousemove=follow;document.onmousedown=beginDrag;document.onmouseup=endDrag;currentX=document.getElementById('currentX');currentY=document.getElementById('currentY');beginX=document.getElementById('beginX');beginY=document.getElementById('beginY');endX=document.getElementById('endX');endY=document.getElementById('endY');dimX=document.getElementById('dimX');dimY=document.getElementById('dimY');var marqueeLeft=0;var marqueeTop=0;dragging=false;void(document.body.style.cursor='crosshair');function follow(e){x=e.pageX;y=e.pageY;controls.style.left=x+15+'px';controls.style.top=y+15+'px';currentX.innerHTML=x;currentY.innerHTML=y;if(dragging){marquee.style.width=x-dragstartX+'px';dimX.innerHTML=Math.abs(x-dragstartX);marquee.style.height=y-dragstartY+'px';dimY.innerHTML=Math.abs(y-dragstartY);}return true;};function beginDrag(e){marquee.style.width=0;marquee.style.height=0;marquee.style.borderColor=marqueeColor;dragging=true;x=e.pageX;y=e.pageY;marquee.style.visibility='visible';marquee.style.left=x+'px';marquee.style.top=y+'px';dragstartX=x;dragstartY=y;beginX.innerHTML=x;beginY.innerHTML=y;return true;}function endDrag(e){dragging=false;x=e.pageX;y=e.pageY;endX.innerHTML=x;endY.innerHTML=y;return true;}
When hovering over an element press enter to blur it.
javascript: (function() { let target = document.body; let listeners = [window.onmousemove, window.onkeypress]; window.onmousemove = (e) => { target = e.target; target.onmouseenter = () => { target.style.outline = "1px solid red"; } target.onmouseleave = () => { target.style.outline = "none"; } }; var style = document.createElement("STYLE"); style.innerHTML = `.blur {filter: blur(${prompt("Blur amount")}px) !important;}`; document.body.appendChild(style); let listener = document.addEventListener("keypress", (e) => { e.preventDefault(); e.stopPropagation(); if (e.key === 'Enter') { target.classList.toggle("blur"); } if (e.key === "q") { document.removeEventListener("keypress", listener); } });})();
Jump to the initial commit of the GitHub repo you're viewing.
javascript:(b=>fetch('https://api.github.com/repos/'+b[1]+'/commits?sha='+(b[2]||'')).then(c=>Promise.all([c.headers.get('link'),c.json()])).then(c=>{if(c[0]){var d=c[0].split(',')[1].split(';')[0].slice(2,-1);return fetch(d).then(e=>e.json())}return c[1]}).then(c=>c.pop().html_url).then(c=>window.location=c))(window.location.pathname.match(/\/([^\/]+\/[^\/]+)(?:\/tree\/([^\/]+))?/));
Generates an aria2c command to download all podcasts shown on a Podnews podcast listing page (e.g. https://podnews.net/podcast/icl3/episode-links )
javascript: { prompt( "To download: ", `aria2c -s 16 -x 16 -j 6 --file-allocation=none -i input.txt` ), window.open( URL.createObjectURL( new Blob( [ [...document.querySelectorAll("a")] .filter((t) => t.href.includes("podtrac.com")) .slice(0, 20) .map((t) => ({ text: t.closest("td")?.querySelector("a[href*=podnews]") ?.innerText || t.closest("td").innerText.split("(link not")[0], link: t.href, })) .map( (i) => `${i.link}\n\tout=${i.text.replace(/[^a-z0-9_ ]/gi, "")}.mp3` ) .join("\n\n"), ], { type: "text/plain" } ) ) ); }
Gets all CSS styles that apply to an element and formats them into one.
javascript:var overlay=document.createElement("div");function handler(e){var t=e.target.getBoundingClientRect();overlay.style.top=`${t.top}px`,overlay.style.left=`${t.left}px`,overlay.style.width=`${t.width}px`,overlay.style.height=`${t.height}px`,console.log(t)}function remove(){document.removeEventListener("mousemove",handler),document.removeEventListener("click",clickhandler),overlay.remove()}async function clickhandler(e){e.preventDefault(),console.log("Getting styles for %o",e.target);var t=await style(e.target),n=function(e){return function e(t){return[...t.children].map(t=>t.children?[t,...e(t).flat(1e4)]:t)}(e).flat(1e4).filter(e=>e instanceof Element)}(e.target);console.log("Children: %o",n);var o=await Promise.all(n.map(e=>style(e)));o=o.map((e,t)=>a(e,n[t].tagName.toLowerCase()));var r=`${a(t,e.target.tagName.toLowerCase())}\n\n${o.join("\n\n")}`;function a(e,t){return`${t} {\n\t${e.map(e=>`/* ${e.selector} */\n\t${e.css}`).join("\n\n\t")}\n}`}console.log(r),navigator.clipboard.writeText(r),prompt("Generated CSS (already copied to clipboard):",r),remove()}async function style(e){var t=[...document.styleSheets];return e.matches=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector,t=t.map(e=>e.href?async function(e){var t;try{t=await mfetch(e).then(e=>e.text())}catch(n){t=await mfetch(`https://cors.explosionscratc.repl.co/${e.split("//")[1]}`).then(e=>e.text())}return n=t,o=document.implementation.createHTMLDocument(""),r=document.createElement("style"),r.textContent=n,o.body.appendChild(r),r.sheet.cssRules;var n,o,r}(e.href):e.rules||e.cssRules),(t=await Promise.all(t)).filter(e=>e.length).map(e=>e=[...e].map(e=>({selector:e.selectorText,css:e.cssText.replace(/^[^}]+\s*{/,"").trim().replace(/}$/,"").trim()}))).flat().filter(t=>e.matches(t.selector))}overlay.setAttribute("style","\n\tpointer-events: none;\n border: 1px solid red;\n background: #f003;\n position: fixed;\n display: block;\n z-index: 1000;\n"),document.body.appendChild(overlay),document.addEventListener("click",clickhandler,!0),document.addEventListener("mousemove",handler),document.addEventListener("keyup",e=>"Escape"===e.key&&remove());var _fetch=window.fetch;window.mfetch=((e,t={})=>(window.FETCH_CACHE||(window.FETCH_CACHE={}),new Promise(n=>{var o=JSON.stringify({url:e,method:t.method,body:t.body,headers:JSON.stringify(t.headers)});if(window.FETCH_CACHE[o])return n(window.FETCH_CACHE[o].clone()),void console.log("Fetched from cache");_fetch(e,t).then(e=>{window.FETCH_CACHE[o]=e.clone(),n(e),console.log("Fetched new version")})})));
Uploads an image to a GitHub repo given token, repo and username
const toBase64=e=>new Promise(((t,o)=>{const a=new FileReader;a.readAsDataURL(e),a.onload=()=>t(a.result),a.onerror=e=>o(e)}));function upload({data:e,username:t,token:o,repo:a}){return new Promise((n=>{var r=`${function e(t){var o=11;return o<t?e(o)+e(t-o):(t=(o=Math.pow(10,t+1))/10,t=Math.floor(Math.random()*(o-t+1))+t,parseInt((""+t).substring(1)))}(120).toString(36)}.${e.split(";base64,")[0].replace("data:","").split("/")[1]}`;fetch(`https://api.github.com/repos/${t}/${a}/contents/images/${r}`,{method:"PUT",headers:{"User-Agent":t,Authorization:"Token "+o},body:JSON.stringify({message:`Upload ${r}`,content:e.split(";base64,")[1]})}).then((e=>e.json())).then((e=>{n(e.content.download_url)}))}))}async function getFile(){return new Promise((e=>{var t=document.createElement("input");t.style.display="none",t.type="file",t.accept="image/*",document.body.appendChild(t),t.onchange=o=>{e(t.files[0]),t.remove()},t.click()}))}(async()=>{var e;upload({username:localStorage.username||(localStorage.username=prompt("GitHub Username")),repo:localStorage.repo||(localStorage.repo=prompt("GitHub Repo")),token:localStorage.token||(localStorage.token=prompt("GitHub Token")),data:await(e=await getFile(),new Promise(((t,o)=>{const a=new FileReader;a.readAsDataURL(e),a.onload=()=>t(a.result),a.onerror=e=>o(e)})))}).then((e=>{var t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),t.remove()}))})();
Discord send message with hidden content
Send a message to a discord channel with hidden content, e.g. an "@everyone" ping. (Note: This sends the message right after you hit "ok" on the prompt, and only works on Discord)
javascript:(async () => {window.dispatchEvent(new Event('beforeunload'));document.body.appendChild(document.createElement('iframe')).contentWindow.localStorage;let token = JSON.parse(localStorage.token);fetch(`/api/v8/channels/${location.href.split("/").filter(i => parseInt(i))[1]}/messages`, { method: "POST", headers: { Accept: '*/*', 'Accept-Language': 'en-US', Authorization: token, 'Content-Type': 'application/json', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) discord/0.0.309 Chrome/83.0.4103.122 Electron/9.3.5 Safari/537.36' }, body: JSON.stringify({ content: `${prompt("Show this")} ||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​|| ${prompt("Hide this")}` })})})();
Opens the file picker and directly uploads an image to Imgur then spits out a link
javascript:showOpenFilePicker().then((e=>e[0].getFile())).then((async e=>{let a=new FormData;a.append("image",e),a.append("title",e.name),fetch("https://api.imgur.com/3/image",{headers:{authorization:"Client-ID 34b90e75ab1c04b"},body:a,method:"POST"}).then((e=>e.json())).then((e=>{e.data.error?alert(`Error uploading: ${e.data.error.message||e.data.error||"[Unknown]"}`):e.data.link?prompt("Image link",e.data.link):(alert("No link found in response, see console for errors."),console.log("Response from Imgur API:",e))}))}));
Lists all links on the current page in a new popup window
javascript:WN7z=open('','Z6','width=400,height=200,scrollbars,resizable,menubar');DL5e=document.links;with(WN7z.document){write('<base target=_blank>');for(lKi=0;lKi<DL5e.length;lKi++){write(DL5e[lKi].toString().link(DL5e[lKi])+'<br><br>')};void(close())}
Loads a script from a URL into the current page
javascript:{ let s = document.createElement("script"); s.src = prompt("Script location:"); document.body.appendChild(s);}
Loads a script into the current page using fetch
javascript:fetch(`https://cors.explosionscratc.repl.co/` + prompt("Script location").split("//")[1]).then(res => res.text()).then(eval);
Opens all links on the page after prompting
javascript:(function(){var n_to_open,dl,dll,i; function linkIsSafe(u) { if (u.substr(0,7)=='mailto:') return false; if (u.substr(0,11)=='javascript:') return false; return true; } n_to_open = 0; dl = document.links; dll = dl.length; for(i = 0; i < dll; ++i) { if (linkIsSafe(dl[i].href)) ++n_to_open; } if (!n_to_open) alert ('no links'); else { if (confirm('Open ' + n_to_open + ' links in new windows?')) for (i = 0; i < dll; ++i) if (linkIsSafe(dl[i].href)) window.open(dl[i].href); } })();
Opens the current page in the wayback machine
javascript: void(location.href = 'http://web.archive.org/web/' + location.href);
Opens the current GitHub repo in its username.github.io/repo counterpart
javascript:(() => { let gh = window.location.href.match(/(?:http|https)+:\/\/github\.com\/([^\.\/]+)\/([^\.\/]+)(?:.+)?/); window.location.href = `https://${gh[1]}.github.io/${gh[2]}`;})();
Print a README or wiki page after removing extra elements
javascript: { var container = document.querySelector("article") || document.querySelector("#readme .Box-body article") || document.querySelector("#readme") || document.querySelector(".page"); if (document.querySelector(".final-path")) { var header = document.createElement("h1"); header.innerText = document.querySelector(".final-path").innerText; container.prepend(header); } document.body.innerHTML = ""; document.body.appendChild(container); container.setAttribute( "style", "position: absolute; top: 0; left: 0; right: 0; bottom: 0; padding: 20px; z-index: 100; background-color: white" ); if (document.querySelector(".page")) { document .querySelector("#wiki-content > div > div.flex-shrink-0.col-12.col-md-3") .remove(); } window.print();}
Print any page, allows you to zap elements first.
javascript:(function(){var i=0,l,d=document,b=d.body,w=window;w.cZ=1;w.cZa=[];while(l=b.getElementsByTagName('*').item(i++)){l.onmouseover=function(e){if(!e)var e=w.event;e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation();if(w.cZ){this.style.background='yellow'}};l.onmouseout=function(e){if(!e)var e=w.event;e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation();if(w.cZ){this.style.background=''}};l.onclick=function(e){if(!e)var e=w.event;e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation();if(!w.cZ){return true}this.style.background='';var h=d.createTextNode('');w.cZa.push(this,this.parentNode,h);this.parentNode.replaceChild(h,this);return false}}var c=d.createElement('table');c.innerHTML='click2zap: <'+'u id=cZp>print<'+'/u> | <'+'u id=cZt>disable<'+'/u> | <'+'u id=cZu>undo<'+'/u>';c.style.background='red';c.style.color='#fff';c.style.position='fixed';c.style.top='0';c.style.right='0';b.insertBefore(c,b.firstChild);c.onclick=function(e){if(!e)var e=w.event;e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation()};d.getElementById('cZp').onclick=function(e){b.removeChild(c);w.print()};d.getElementById('cZt').onclick=function(e){w.cZ=w.cZ?0:1;this.innerHTML=w.cZ?'disable':'enable'};d.getElementById('cZu').onclick=function(e){if(!w.cZa.length)return;var h=w.cZa.pop(),p=w.cZa.pop(),r=w.cZa.pop();p.replaceChild(r,h)}})();
Enable reader mode on the current page.
javascript:(function(){readConvertLinksToFootnotes=false;readStyle='style-apertura';readSize='size-large';readMargin='margin-wide';_readability_script=document.createElement('script');_readability_script.type='text/javascript';_readability_script.src='https://ejucovy.github.io/readability/js/readability.js?x='+(Math.random());document.documentElement.appendChild(_readability_script);_readability_css=document.createElement('link');_readability_css.rel='stylesheet';_readability_css.href='https://ejucovy.github.io/readability/css/readability.css?1';_readability_css.type='text/css';_readability_css.media='all';document.documentElement.appendChild(_readability_css);_readability_print_css=document.createElement('link');_readability_print_css.rel='stylesheet';_readability_print_css.href='https://ejucovy.github.io/readability/css/readability-print.css';_readability_print_css.media='print';_readability_print_css.type='text/css';document.getElementsByTagName('head')[0].appendChild(_readability_print_css);})();
Generates a link to native chrome reader mode for the current page.
javascript: { reader(location.href).then((r) => prompt("Paste this in the browser bar", r)); async function reader(url) { return `chrome-distiller://00000000-0000-0000-0000-000000000000_${await sha256( url )}/?url=${escape(url)}`; async function sha256(t) { (t = new TextEncoder().encode(t)), (t = await crypto.subtle.digest("SHA-256", t)); const n = Array.from(new Uint8Array(t)); return n.map((t) => t.toString(16).padStart(2, "0")).join(""); } }}
Removes most colors from the current page allow much better readability
javascript: (function() {var newSS, styles = '* { background: white ! important; color: black !important } :link, :link * { color: #0000EE !important } :visited, :visited * { color: #551A8B !important }';if (document.createStyleSheet) {document.createStyleSheet("javascript:'" + styles + "'");} else {newSS = document.createElement('link');newSS.rel = 'stylesheet';newSS.href = 'data:text/css,' + escape(styles);document.getElementsByTagName("head")[0].appendChild(newSS);}})();
Search the current site for a search term using google's site: keyword
javascript:(function(){ window.location.href = 'https://google.com/search?q=site:' + new URL(window.location.href).hostname + ' ' + prompt('What are you searching for?');})();
Show all the scripts on the current page.
javascript:(function(){s=document.getElementsByTagName('SCRIPT');tx='';sr=[];for(i=0;i<s.length;i++){with(s.item(i)){t=text;if(t){tx+=t;}else{sr.push(src)};}};with(window.open()){document.write('<textarea id="t">'+(sr.join("\n"))+"\n\n-----\n\n"+tx+'</textarea><script src="https://beautifier.io/js/lib/beautify.js"></script><script>with(document.getElementById("t")){value=js_beautify(value);with(style){width="99%";height="99%";borderStyle="none";}};</script>');document.close();}})();
Skip the YouTube ad that's currently playing, or simply jump to the end of a video
javascript:document.querySelector('video').currentTime=document.querySelector('video').duration
Constantly tries to speed up the currently playing video.
javascript:setInterval(() => document.querySelector("video").playbackRate = (window.speed || (window.speed = +prompt("New speed", 10))), 50)
Split the current page horizantally
javascript:document.write('<HTML><HEAD></HEAD><FRAMESET ROWS=\'50%,*\'><FRAME SRC=' + location.href + '><FRAME SRC=' + location.href + '></FRAMESET></HTML>');document.close();
Split the current page vertically
javascript:document.write('<HTML><HEAD></HEAD><FRAMESET COLS=\'50%,*\'><FRAME SRC=' + location.href + '><FRAME SRC=' + location.href + '></FRAMESET></HTML>')
View all passwords in forms on the current page
javascript: (function() {var s, F, j, f, i;s = "";F = document.forms;for (j = 0; j < F.length; ++j) {f = F[j];for (i = 0; i < f.length; ++i) {if (f[i].type.toLowerCase() == "password") s += f[i].value + "\n";}}if (s) alert("Passwords in forms on this page:\n\n" + s);else alert("There are no passwords in forms on this page.");})();
Get the direct link for a <video src>
element to a YouTube video
javascript: { let vid = ytplayer.bootstrapPlayerResponse.streamingData.formats.sort( (a, b) => b.width - a.width )[0]; download( vid.url, `${ytplayer.bootstrapPlayerResponse.videoDetails.title}.${ vid.mimeType.replace(`video/`, "").split(" ")[0] }` ); function download(url, filename) { const link = document.createElement("a"); link.href = url; link.setAttribute("target", "ytdl"); link.download = filename; link.click(); }}
Shorten the current URL using is.gd
javascript:fetch("https://cors.explosionscratc.repl.co/is.gd/create.php?format=simple&url=https://github.com/explosion-scratch").then(r => r.text()).then((s) => prompt("Shortened: ", s))
View all passwords on the current page when focusing on an input
javascript: { document.querySelectorAll("input[type='password']").forEach(el => { el.addEventListener("focus", () => { el.setAttribute("type", "text"); }) el.addEventListener("blur", () => { el.setAttribute("type", "password"); }) })}
Post the current page to HackerNews (opens a new window with prefilled content)
javascript:window.location="https://news.ycombinator.com/submitlink?u="+encodeURIComponent(document.location)+"&t="+encodeURIComponent(document.title)
Enables discord developer mode + experiments in settings (Working May 11th 2022)
javascript:webpackChunkdiscord_app.push([["wp_isdev_patch"],{},e=>{for(var p in e.c)!1===e.c[p].exports?.default?.isDeveloper&&Object.defineProperty(e.c[p].exports.default,"isDeveloper",{get:()=>!0})}]);
Opens a style editor that supports Less, beautification, autosave and more
javascript:(() => {let height="100px",font="Montserrat",html=`\n<title>Style editor</title>\n<script src="https://cdn.jsdelivr.net/npm/less@4"><\/script>\n<script src=https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.14/ace.js><\/script>\n<script>window.define = ace.define;<\/script>\n<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.14/keybinding-vscode.min.js"><\/script>\n<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.14/mode-less.min.js"><\/script>\n<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.14/ext-language_tools.min.js"><\/script>\n<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.6/ext-beautify.js"><\/script>\n<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.0/beautify.min.js"><\/script>\n<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.0/beautify-css.min.js"><\/script>\n<div id="top">\n <h1>Style editor</h1>\n <label><input type="checkbox" id="live" name="live" checked> Enable live update</label>\n <div id="buttons">\n <button id="beautify" onclick="beautify()">Beautify</button>\n <button id="save" onclick="save()">Save to file</button>\n <button id="copy" onclick="copy()">Copy</button>\n <button id="compile" onclick="compile()">Compile to CSS</button>\n </div>\n</div>\n<div id=editor></div>\n<style>\n@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,200;0,300;0,400;0,500;1,200;1,300;1,400&family=Work+Sans:wght@300&display=swap');\n@import url('https://fonts.googleapis.com/css2?family=${font.replace(/ /g,"+")}');\n\n* {\n margin: 0;\n padding: 0;\n}\n#editor, #editor *, .ace_tooltip {\n font-family: "Source Code Pro", monospace;\n}\n\n#buttons button {\n padding: 5px 10px;\n border: 1px solid #45f4;\n background: #45f1;\n color: white;\n border-radius: 3px;\n cursor: pointer;\n transition: all .2s ease;\n}\n#buttons button:hover {\n background: #45f3;\n}\n#buttons button:active {\n transform: scale(.9);\n}\n#top {\n display: flex;\n justify-content: center;\n align-items: center;\n color: #eee;\n background: #333;\n height: ${height};\n flex-direction: column;\n font-family: '${font}', sans-serif;\n}\n #editor {position: absolute; top: ${height}; bottom: 0; left: 0; right: 0}\n</style>\n<script>\nconst $ = (a) => document.querySelector(a);\nlet placeholder = "Write CSS here! Any edits will update the main page in real time. They are also saved in localStorage";\nvar langTools = ace.require("ace/ext/language_tools");\nvar editor = ace.edit("editor");\neditor.setTheme("ace/theme/monokai");\neditor.session.setMode("ace/mode/less");\neditor.setShowPrintMargin(false);\neditor.setOptions({\n enableBasicAutocompletion: true,\n enableSnippets: true,\n enableLiveAutocompletion: true,\n placeholder,\n});\n\neditor.setValue(localStorage.style_bookmarklet_style || ${JSON.stringify(localStorage.style_bookmarklet_style||"")})\n\nfunction update() {\n setStyle(editor.session.getValue())\n var shouldShow = !editor.session.getValue().length;\n var node = editor.renderer.emptyMessageNode;\n if (!shouldShow && node) {\n editor.renderer.scroller.removeChild(editor.renderer.emptyMessageNode);\n editor.renderer.emptyMessageNode = null;\n } else if (shouldShow && !node) {\n node = editor.renderer.emptyMessageNode = document.createElement("div");\n node.textContent = placeholder;\n node.className = "ace_emptyMessage"\n node.style.padding = "0 9px"\n node.style.position = "absolute"\n node.style.zIndex = 9\n node.style.opacity = 0.5\n editor.renderer.scroller.appendChild(node);\n }\n}\neditor.on("input", update);\nsetTimeout(update, 100);\n\nasync function setStyle(code){\n if (!$("#live").checked){return}\n localStorage.setItem("style_bookmarklet_style", code);\n let w = window.opener;\n w.postMessage({type: "setStorage", code})\n let doc = w.document;\n code = (await less.render(code)).css;\n if (doc.querySelector("#style_bookmarklet_style")){\n doc.querySelector("#style_bookmarklet_style").innerHTML = code;\n } else {\n let style = doc.createElement("style");\n style.id = "style_bookmarklet_style";\n doc.body.insertAdjacentElement("afterend", style);\n }\n}\nfunction beautify(){\n setValue(css_beautify(editor.session.getValue()))\n}\nfunction save(){\n download(editor.session.getValue(), window.opener.location.hostname.replace(/\\./g, "-") + " style.css", "text/css")\n}\nasync function copy(){\n try {\n await navigator.clipboard.writeText(editor.session.getValue())\n } catch(_){\n prompt("Couldn't copy, copy from here instead: ", editor.session.getValue());\n }\n}\nasync function compile() {\n let {css} = await less.render(editor.session.getValue());\n setValue(css_beautify(css));\n}\nfunction setValue(val){\n let o = editor.selection.toJSON();\n editor.session.setValue(val);\n editor.selection.fromJSON(o);\n}\nfunction download(data, filename, type) {\n var file = new Blob([data], {type: type});\n if (window.navigator.msSaveOrOpenBlob) // IE10+\n window.navigator.msSaveOrOpenBlob(file, filename);\n else { // Others\n var a = document.createElement("a"),\n url = URL.createObjectURL(file);\n a.href = url;\n a.download = filename;\n document.body.appendChild(a);\n a.click();\n setTimeout(function() {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url); \n }, 0); \n }\n}\n$("#live").onchange = () => {\n setStyle(editor.session.getValue())\n}\n<\/script>\n`,url=URL.createObjectURL(new Blob([html],{type:"text/html"})),width=window.outerWidth/3,w=window.open(url,"Style editor",`height=${window.outerHeight},width=${width},left=${window.outerWidth-width},titlebar=no,location=no,menubar=no,toolbar=no`);window.addEventListener("message",({data:e})=>{"setStorage"===e.type&&localStorage.setItem("style_bookmarklet_style",e.code),console.log(e)});})();
Translate something using the google translate direct API
javascript: { async function translate(t, e, a) { (e = { text: t || "", source: e || "auto", target: a || "en" }), (a = await fetch( `https://translate.googleapis.com/translate_a/single?client=gtx&sl=${ e.source }&tl=${e.target}&dt=t&q=${encodeURI(e.text)}` ).then((t) => t.json())); return { source: e.source, translated: a[0][0][0], result: a }; } translate( prompt("What to translate?", window.getSelection().toString()), undefined, prompt("What language?", "en") ).then(({ translated }) => alert(translated));}
Sets an animated thumbnail on a scratch project (uses an external script at is.gd/thumb2)
javascript:x=document.createElement("script");x.src="//is.gd/thumb2"; void document.getElementsByTagName("head")[0].appendChild(x);
HTMLifies the current scratch project (opens a new window)
javascript: { location = `https://sheeptester.github.io/htmlifier/?upload-mode=id&project-url=${escape(window.location.href)}&start-stop-controls=on&title=${escape(document.querySelector(".project-title").innerText)}&id=${escape(window.location.pathname.split("/")[2])}`}
Print headers on the response to the current page in the console
javascript:fetch(location.href).then(r => Object.fromEntries(r.headers.entries())).then(console.table)
View just the image on any one of thousands of image hosting sites. Credit to Owyn/HandyImage (GH repo)
(()=>{if("undefined"==typeof unsafeWindow&&(unsafeWindow=window),"undefined"!=typeof GM_registerMenuCommand&&GM_registerMenuCommand("Handy Image Configuration",cfg,"C"),window.location.href.lastIndexOf(window.location.hostname)+window.location.hostname.length+1==window.location.href.length)return console.warn("we are on website's main page, aren't we?"),!1;if(1==document.images.length&&document.images[0].src==window.location.href)return console.warn("handy isn't needed for directly opened images"),!1;if(document.referrer&&-1!=document.referrer.lastIndexOf(window.location.hostname)&&document.referrer.lastIndexOf(window.location.hostname)+1==document.referrer.length-window.location.hostname.length)return console.warn("Handy Image: userscript stopped itself from running INTENTIONALLY: cuz your previous page is websites mainpage so you probably have just uploaded a picture yourself"),!1;if(sessionStorage.length)if(sessionStorage.hji){if(-1!=sessionStorage.hji.indexOf(window.location.href))return console.warn("Handy Image: userscript stopped itself from running INTENTIONALLY"),sessionStorage.removeItem("hji"),!1;sessionStorage.removeItem("hji")}else if(sessionStorage.hji_back){if(Date.now()<parseInt(sessionStorage.hji_back))return console.warn("Handy Image: userscript now helps you go to previous page automatically"),sessionStorage.removeItem("hji_back"),window.history.go(-1),!1;sessionStorage.removeItem("hji_back")}function q(e){return document.body?document.body.querySelector(e):null}var cfg_direct=!1,cfg_bgclr="grey",cfg_fitWH=!0,cfg_fitB=!1,cfg_fitS=!0,cfg_fitOS=!1,cfg_js,dp=!1;let orgImgWidth,orgImgHeight;var rescaled=0,tb,timeout=1e3,FireFox=-1!=navigator.userAgent.indexOf("Firefox"),i,j,ext_list=["webm","mp4","ogg","zip","7z","rar","psd","swf","doc","rtf","pdf"],iurl=window.location.hostname;iurl.indexOf("www.")||(iurl=iurl.substr(4));var host=iurl;function ws(){FireFox||window.stop()}function sanitize(){unsafeWindow.document.createElement=unsafeWindow.console.log;for(let e=unsafeWindow.setTimeout(function(){},0);e>0;e--)unsafeWindow.clearTimeout(e);removeAllListeners()}0==window.location.pathname.indexOf("//")&&(iurl+="/");const protected_createElement=Document.prototype.createElement.bind(document);var _eventHandlers={},origAdd=document.addEventListener;function protected_addEventListener(e,i,a=!1){return e in _eventHandlers||(_eventHandlers[e]=[]),_eventHandlers[e].push({node:this||window,handler:i,capture:a}),origAdd.call(this,e,i,a)}function removeAllListeners(){for(let e in _eventHandlers)_eventHandlers[e].forEach(({node:i,handler:a,capture:c})=>i.removeEventListener(e,a,c)),delete _eventHandlers[e]}function onVisibilityChange(){"visible"===document.visibilityState&&i&&i.src&&(autoresize(),window.removeEventListener("visibilitychange",onVisibilityChange))}function DeleteAllCookies(){document.cookie.split(";").forEach(function(e){document.cookie=e.replace(/^ +/,"").replace(/=.*/,"=;expires="+(new Date).toUTCString()+";path=/")})}function onscript(e){e.preventDefault(),e.stopPropagation()}function onbeforeunload(){sessionStorage.hji_back=Date.now()+2e3}function makeimage(){if("string"!=typeof cfg_js)return setTimeout(function(){makeimage()},11),!1;if(!0===cfg_direct)return unsafeWindow.location.href=i.src,!1;cfg_bgclr&&(document.body.bgColor=cfg_bgclr),document.body.style.margin="0px",document.body.innerHTML="<style>img { position: absolute; top: 0; right: 0; bottom: 0; left: 0; image-orientation: from-image; background-color: "+cfg_bgclr+";}</style>",ws();let e=i.src;(i=protected_createElement("img")).src=e,i.style.margin="auto",document.body.appendChild(i),i.addEventListener("click",rescale,!0),i.addEventListener("auxclick",rescale,!0),i.addEventListener("mousedown",mousedown,!0),window.addEventListener("keydown",onkeydown,!0),dp&&(console.warn("you are on a double-page image hosting (probably)"),window.addEventListener("beforeunload",onbeforeunload,!0)),onVisibilityChange()}function find_text_in_scripts(e,a,c,s){let o=document.getElementsByTagName("script");for(let t=0;t<o.length;t++){s&&-1!=o[t].innerHTML.indexOf(s)&&(o[t].innerHTML=o[t].innerHTML.substring(0,o[t].innerHTML.indexOf(s)));let r=c?o[t].innerHTML.indexOf(e):o[t].innerHTML.lastIndexOf(e);if(-1!=r)return r+=e.length,(i=protected_createElement("img")).src=decodeURIComponent(o[t].innerHTML.substring(r,o[t].innerHTML.indexOf(a,r)).split("\\").join("")),!0}return!1}function post(e,i,a){a=a||"post";let c=protected_createElement("form");c.setAttribute("method",a),c.setAttribute("action",e);for(let e in i)if(i.hasOwnProperty(e)){let a=protected_createElement("input");a.setAttribute("type","hidden"),a.setAttribute("name",e),a.setAttribute("value",i[e]),c.appendChild(a)}document.body.appendChild(c),c.submit()}function makeworld(){let e;if(!i){switch(host){case"gist.github.com":return void(document.body&&(i=1,cfg()));case"simplest-image-hosting.net":case"hostimage.ru":case"imgchili.net":case"adultimages.xyz":i=q("img");break;case"myceleb.net":case"depic.me":case"dpic.me":i=q("img#pic");break;case"imagebin.ca":(i=q("a img"))&&(i.src=i.parentNode.href);break;case"savepic.org":case"savepic.ru":i=q('a img:not([src*="/images/"])');break;case"motherless.com":j=!0,i=q("div#media-media div a img");break;case"awesomescreenshot.com":i=q("img#screenshot");break;case"dropbox.com":j=!0,(i=q("img.preview-image"))&&(i.src=i.src.replace(/(size_mode)=\d+/,"$1=5"));break;case"img.3ezy.net":case"image-bugs.com":case"imgclover.com":case"demo.chevereto.com":case"daily-img.com":case"celebimg.com":case"sfwimg.com":case"img3x.com":case"imgskull.xyz":case"imgskull.com":case"2i.sk":case"2i.cz":case"deffe.com":case"imagik.fr":case"gallerycloud.net":case"tryimg.com":case"fsfiles.org":case"picpicture.com":case"picpie.org":case"lostpic.net":case"batpic.com":(i=document.head.querySelector('link[rel="image_src"]'))&&(i.src=i.href,i.src=i.src.replace("_800.","."));break;case"imagebam.com":j=!0,(i=q("a i.fa-download"))?i.src=i.parentNode.href:(i=q("#continue a"))&&"none"!==i.parentNode.style.display&&i.click();break;case"directupload.net":case"bilderhoster.net":case"noelshack.com":case"kephost.com":case"i.ruspotting.net":case"gifyu.com":case"picr.ws":case"linkmypic.com":case"sharepic.org":case"zuly.de":case"upload.vstanced.com":case"thro.bz":case"qoou.net":case"brightpic.tk":case"cweb-pix.com":case"hosting.webspell.fr":case"i-pict.ru":case"images.woh.to":case"imghaze.com":case"imgup.nl":case"kuvapankki.in":case"myimageshare.com":case"nium.co":case"pix.hostux.net":case"pixoload.de":case"primeimg.co":case"pic.xtream-reallife.de":case"ultraimg.com":case"safeimage.biz":case"imgextra.uk":case"ss.movierls.net":case"xxximagetpb.org":case"pix.ac":case"sparrowpics.com":case"prnt.sc":case"imgmax.com":case"extraimago.com":case"extraimage.net":case"imgcloud.pw":case"z4a.net":case"jiopic.com":case"wwv.imgcredit.xyz":case"moreimage.pw":case"lookimg.com":case"subefotos.com":case"rule34.xxx":case"imgcredit.xyz":case"imgbox.eu":case"rintor.space":case"imgbb.com":case"servimg.com":case"picmoney.org":case"skrinshoter.ru":case"imgmak.com":case"picklik.ru":case"jpg.church":case"imghub.ru":(i=document.querySelector('meta[property="og:image"], [name="og:image"]'))?i.src=i.content:(i=q("a[download]"))&&(i.src=i.href);break;case"twitter.com":j=!0,unsafeWindow.history.replaceState=unsafeWindow.console.log,(i=q('a[href*="/photo/'+Number(window.location.href.at(-1))+'"] img'))&&(i.src=i.src.substring(0,i.src.indexOf("&name="))+"&name=orig");break;case"m.imgur.com":j=!0,i=q("img.Image");break;case"imgur.com":if(j=!0,(e=document.querySelectorAll(".image-placeholder,.post-image-placeholder,.image.post-image > img")).length){if(1!=e.length)return console.log("Handy Image: userscript stopped itself from running INTENTIONALLY, - it is not just a single image on a page"),void(i=1);i=e[0]}break;case"ameblo.jp":j=!0,i=q("img#imgItem");break;case"instagram.com":if(j=!0,q("header")){if(1!==(e=document.querySelectorAll("div[role=button] > div > div img")).length)return console.log("Handy Image: userscript didn't find a single image to fullsize"),void(i=1);i=e[0]}break;case"flickr.com":case"secure.flickr.com":find_text_in_scripts('"displayUrl":"','"',!1,'"canComment"');break;case"artstation.com":j=!0,1===(e=document.querySelectorAll('a[href*="&dl="]')).length&&((i=e[0]).src=i.href);break;case"pixiv.net":if(j=!0,i=document.head.querySelector('meta[name="preload-data"]')){let e=JSON.parse(i.getAttribute("content")).illust,a=e[Object.keys(e)[0]];if(1!==a.pageCount)return void console.warn("Manga page with multiple images, no action taken further");if(2==a.illustType)return void console.warn("Animated ugoira image found, no action taken further");i.src=a.urls.original}break;case"chan.sankakucomplex.com":(i=q('a[itemprop="contentUrl"]'))&&(i.src=i.href);break;case"bcy.net":1==(e=document.querySelectorAll("img.detail_clickable")).length&&((i=e[0]).src=e[0].src.replace("/w650",""));break;case"imageshack.com":(i=q('input[value*="'+iurl+'/f/"]'))&&(window.location.href=i.value.replace("/f/","/i/")),i=q("img[data-width]");break;case"22pixx.xyz":case"trueimg.xyz":(e=window.location.href.match(/[a-z]+-([a-z].+(?:\.jpe?g|png|gif|webp))/i))&&(i={src:window.location.origin+"/"+e[1]});break;case"h4z.it":(i=document.images[2])&&(i.src=i.parentNode.href);break;case"thumbsnap.com":(i=q("img#thepic"))&&i.parentNode.href&&(i.src=i.src.replace("/s/","/i/"));break;case"imgbox.com":case"imageupper.com":case"hotflick.net":case"upix.me":!(i=q("img#img"))&&window.location.hash&&((i=q("a")).src=window.location.href.replace("#",""));break;case"imagesnake.com":case"imagesnake.org":case"freebunker.com":case"imagefruit.com":case"imagestime.com":case"imgcarry.com":case"pornbus.org":case"fotoo.pl":case"hostpix.de":case"uploadking.biz":case"foto.xhost.lv":case"onimage.net":case"storepic.com":case"hostarea.de":case"imgshots.com":i=q("img#img_obj");break;case"abload.de":(i=document.body.querySelectorAll("img#image"))&&(i=i[i.length-1]);break;case"imagecrest.com":case"imagepearl.com":case"imageup.ru":if(i=q("#verify2")){let e=screen.width,i=screen.height,a=q("#i").value,c=q("#r").value,s=new XMLHttpRequest;s.onreadystatechange=function(){4==s.readyState&&200==s.status&&location.reload()},s.open("GET","verify.php?w="+e+"&h="+i+"&i="+a+"&r="+c,!1),s.send();break}i=q("img#image");break;case"fastpic.ru":case"fastpic.org":i=q('img[src*="/big/"]');break;case"bayimg.com":i=q("img#mainImage");break;case"imageban.ru":case"imageban.net":i=q('img[src*="'+iurl+'/out/"]');break;case"xup.in":i=q('img[src*="/exec/"]');break;case"jpegbay.com":(i=q("a[class]"))&&(i.src=i.href);break;case"keep4u.ru":i=q('img[src*="/b/"]');break;case"euro-pic.eu":case"picfox.org":case"freeimage.us":case"xxx.freeimage.us":case"pixsor.com":case"img.pereslavl.ru":case"rupict.ru":case"host99.byethost4.com":case"eazypics.net":case"xtupload.com":case"t.williamgates.net":case"imgz.pw":case"imgurx.net":find_text_in_scripts("<img src='","'")||(i=q("a[download]"))&&(i.src=i.href);break;case"amateri.cz":find_text_in_scripts('var orig_url="','"')&&(i.src=i.src.replace("http://www.amateri.cz/orig.php?&img=","http://img2.amateri.cz/users/"));break;case"pixsense.net":case"imagespicy.site":find_text_in_scripts('"src","','"');break;case"pix-x.net":case"picclock.ru":case"imgcach.ru":case"pikoclick.ru":case"p0xpicmoney.ru":case"picker-click.ru":case"picpic.online":case"drlink.online":(i=q('img[onclick*="mshow"]'))&&(i.src=i.src.replace("-thumb",""),i.src=i.src.replace("img_thumb","img_full"));break;case"pics-money.ru":if(i=q('img[src*="/full/"]'))break;case"pic5you.ru":case"pic4you.ru":case"picforall.ru":case"picage.ru":case"images-host.biz":case"pic-mir.ru":case"payforpic.ru":case"freshpics.ru":case"imgbase.online":case"picpays.ru":case"piccash.net":case"imgbase.ru":(i=q('img[src*="thumb"]'))&&(i.src=i.src.replace("-thumb",""),i.src=i.src.replace("img_thumb","img_full"),i.src=i.src.replace("_thumb",""));break;case"tinypic.com":i=q("img#imgElement");break;case"picshot.pl":(i=q('img[src*="'+iurl+'/p"]'))&&(i.src=i.src.replace("thumb","file"));break;case"sharenxs.com":if((i=q("img.view_photo"))&&(i.src=i.src.replace("/thumbnails/","/images/"),i.src=i.src.replace("/tn-","/"),i.src=i.src.replace("/mid/","/wz/"),e=q("div.alert.alert-info.nomargin.photo_name span"))){let a=i.src;i.src=a.substring(0,a.lastIndexOf("/")+1)+e.textContent+a.substring(a.lastIndexOf("."))}break;case"radikal.ru":case"radical-foto.ru":case"radikal-foto.ru":case"f-page.ru":case"f-lite.ru":case"f-picture.net":find_text_in_scripts('"Url":"','"');break;case"jerking.empornium.ph":find_text_in_scripts('\turl: "','"',!0);break;case"bilder-space.de":case"imagesup.de":i=q("img.picture");break;case"pix.toile-libre.org":case"photo-host.org":case"myxpic.com":case"picness.com":(i=q('a[href*="original"]'))&&(i.src=i.href);break;case"pimpandhost.com":(i=q("div.main-image-wrapper"))&&(i.src=i.dataset.src);break;case"postlmg.cc":i=q("img#main-image");break;case"sexybabepics.net":case"keepimg.com":case"ibb.co":if(i=document.head.querySelector('meta[property="og:image"]')){i.src=i.content;break}case"pasteboard.co":if(i=document.head.querySelector('meta[name="twitter:image"]')){i.src=i.content;break}case"picsee.net":(i=q('a[href*="/upload"]'))&&(i.src=i.href);break;case"imagevenue.com":i=q('img[style*="max-width:"]');break;case"hentai-foundry.com":(i=q(".boxbody img"))&&i.onclick&&i.click();break;case"rule34.us":j=!0,(i=q('a[href*="/images/"]'))&&(i.src=i.href);break;case"rule34hentai.net":case"danbooru.donmai.us":(i=q("a[download]"))&&(i.src=i.href);break;case"e621.net":j=!0,(i=q("div#image-download-link a"))&&(i.src=i.href);break;case"gelbooru.com":case"youhate.us":case"safebooru.org":j=!0,(i=q('a[href*="/images/"][style]'))&&(i.src=i.href);break;case"deviantart.com":if(j=!0,q('div[role="complementary"]'))if((i=q("a[download]"))&&-1==i.href.indexOf("deviantart.com/users/outgoing?"))i.src=i.href,console.log("found download link");else if(parseInt(window.location.pathname.substring(window.location.pathname.lastIndexOf("-")+1))<=790677560)(i=document.head.querySelector('link[rel="preload"][as="image"]'))&&(i=q('img[src="'+i.href+'"]'))&&("zoom-in"===getComputedStyle(i).cursor?(-1!==(e=i.src.search(/\/f\/[^\/]+\/[^\/]+/))&&(i.src=i.src.substring(0,e+i.src.match(/\/f\/[^\/]+\/[^\/]+/)[0].length)),i.src=i.src.replace("/f/","/intermediary/f/"),console.log("hacked image resolution to maximum")):console.log("found very old and small image - no higher resolution to look for"));else{if(i=q('div[role="dialog"] div img')){console.log("found zoomed-in image"),null!==(e=i.src.match(/,q_\d\d,/))&&(i.src=i.src.replace(e[0],",q_100,"),console.log("hacked image quality to maximum (but not resolution)"));break}if(i=q('div[data-hook="art_stage"] div div div img')){console.log("found un-zoomed image, clicked it"),i.click(),i=null;break}}break;case"furaffinity.net":j=!0,(i=q("div.download a"))&&(i.src=i.href);break;case"imagehost.eu":(i=q("a#image"))&&(i.src=i.href);break;case"imgplus.info":i=q('img[src*="full"]');break;case"zerochan.net":(i=q('a[href*="full"]'))&&(i.src=i.href);break;case"wstaw.org":(i=q('a[href*="/m/"]'))&&(i.src=i.href);break;case"imageshost.ru":(i=q('a[href*="/img/"]'))&&(i.src=i.href);break;case"uploadimage.ro":i=q('img[src*="img.php"]');break;case"imageno.com":i=q('img[src*="image.php"]');break;case"loadpix.de":i=q('img[src*="bild.php"]');break;case"bildr.no":i=q('img[src*="image"]');break;case"iv.pl":case"funextra.hostzi.com":case"freakimage.com":case"imageurlhost.com":case"superkipje.com":case"ximg.co.uk":case"sl-images.ath.cx":case"pikczery.pl":case"hosting-zdjec.pl":case"upislam.com":case"add-screen.com":case"my-collection.ru":case"img.schattorie.nl":case"forexrainbow.com":case"imgupload.pl":case"addpix.net":case"myuploadedimages.com":case"multihoster.saxonia-fighter.de":case"imgdone.com":case"greenpiccs.com":case"balkanelite.org":case"qrrro.com":case"vipix.pw":case"imagecurl.com":case"imagecurl.org":case"imagescanner.cc":(i=q('a[href*="images/"]'))&&(i.src=i.href);break;case"fotoshack.us":i=q('img[src*="/fotos/"]');break;case"subefotos.com":j=!0,i=q('img[src*="fotos.'+iurl+'"]');break;case"pictureshoster.com":case"zaslike.com":case"dwimg.com":case"uploadagent.de":(i=q('a[href*="files/"]'))&&(i.src=i.href);break;case"photosex.biz":case"imgchilibum.ru":i=q('img[src*="/pic"]');break;case"pronpic.org":(i=q('img#small_img[src*="/pic/"]'))&&(i.src=i.src.replace("th_",""));break;case"imadul.com":(i=q("div.img_box a"))&&(i.src=i.href);break;case"imgmega.com":case"pic.re":case"foxyimg.link":case"picbaron.com":case"imgbaron.com":case"kvador.com":case"pics4you.net":if(i=q('input[type="submit"]'),dp=!0,j=!0,i){i.click();break}case"screenlist.ru":case"picshare.geenza.com":case"mojoimage.com":case"imagecherry.com":case"10.imageleon.com":case"img4.imagetitan.com":case"ninjaimages.com":i=q('img[onload*="scale"]');break;case"bild.me":case"imagecarry.com":case"imagedunk.com":case"imageswitch.com":case"piclambo.net":case"picleet.com":case"yankoimages.net":case"picturedip.com":case"imagezilla.net":case"hotchyx.com":case"imagehousing.com":case"cubeupload.com":case"dumparump.com":case"uploads.ru":case"myimg.de":case"root-space.eu":case"mepic.ru":case"postto.me":i=q('img[src*="'+iurl+'"]');break;case"ask.fm":(i=q('img[src*="'+iurl+'"][id]')).src=i.src.replace("/original/","/large/");break;case"photo.weibo.com":i=q('img[src*="/large/"]');break;case"picfront.org":j=!0,i=q('img[src*="'+iurl+'"][title]');break;case"platimzafoto.ru":case"pic-money.ru":case"imgmoney.ru":case"img24.org":case"svetmonet.ru":case"pic4share.ru":case"pic-images.ru":case"imgbun.ru":case"imgspic.ru":case"jpgstore.ru":case"moonpix.ru":case"picpower.ru":case"piccloud.ru":case"pixxss.ru":case"pixxsees.ru":case"2picsun.ru":case"pic2x.ru":case"img-pika.ru":case"1pic2x.ru":case"1pics1img.ru":case"wwxxww.ru":case"pic3you.org":case"shaggyimg.pro":case"imgsmarts.info":case"dailyimages.xyz":case"imgazure.com":(e=document.getElementsByTagName("button")).length&&e[e.length-1].click(),dp=!0,i=q('img[src*="/pic.jpeg"]');break;case"imagerar.com":if(-1!=window.location.href.indexOf("img-")){window.location.href=window.location.href.replace("img-","img2-");break}case"imgprime.com":if(-1!=window.location.href.indexOf("img-")){window.location.href=window.location.href.replace("img-","img3-");break}if(-1!=window.location.href.indexOf("/imga-u/")){window.location.href=window.location.href.replace("/imga-u/","/imgb-u/");break}if(-1!=window.location.href.indexOf("/imgb-u/")){i=q('img[src*="/u/b/"]');break}case"freeimagehosting.net":case"uploadhouse.com":case"fotos-hochladen.net":case"picshare.ru":case"imgtab.net":i=q('img[src*="uploads/"]');break;case"xtremeshack.com":i=q('img[src*="/photos/"]');break;case"500px.com":if(j=!0,i=q('img.photo-show__img[src*="_m"]')){var a=i.src.match("/photo/(\\d+)/");if(a){var c=new XMLHttpRequest;c.open("GET","https://api.500px.com/v1/photos?ids="+a[1]+"&image_size=4096"),c.onload=function(){if(200==c.status)try{i.src=JSON.parse(c.response).photos[a[1]].images[0].url,console.log("hacked image resolution to maximum")}catch(e){console.warn(e)}},c.send()}}break;case"picturepush.com":i=q('img[src*="/photo/"]');break;case"keptarolo.hu":i=q('img[src*="/kep/"]');break;case"truepic.org":i=q('img[src*="/u/"]');break;case"imagearn.com":i=q('img[src*="/imags/"]');break;case"ichan.org":i=q('img[src*="/src/"]');break;case"ibunker.us":case"hostingpics.net":i=q('img[src*="pics/"]');break;case"dewimg.com":if(j=!0,(e=document.querySelectorAll("input[type='submit']")).length){let a;for(a=e.length-1;a>=0;a--)if("hidden"!=window.getComputedStyle(e[a]).visibility&&0!=e[a].offsetWidth&&-1==e[a].value.indexOf("eply")&&-1==e[a].value.indexOf("Log"))return e[a].removeAttribute("disabled"),e[a].click(),void(i=1)}case"imgoutlet.pw":case"imgrock.pw":case"imgview.pw":case"imgmaze.pw":case"imgdew.pw":case"imgtown.pw":case"picrok.com":case"outletpic.com":case"imgviu.com":case"mazpic.com":case"pictwn.com":if(j=!0,dp=!0,i=q("img.picview")){i.getAttribute("src")&&i.getAttribute("src").length||(i=null);break}if((e=document.querySelectorAll("[type='button']")).length||(e=document.querySelectorAll("button")),e.length){let a;for(a=e.length-1;a>=0;a--)if("hidden"!=window.getComputedStyle(e[a]).visibility&&0!=e[a].offsetWidth&&-1==e[a].value.indexOf("eply")&&-1==e[a].value.indexOf("Log")){e[a].removeAttribute("disabled"),e[a].click(),i=1;break}}break;case"crownimg.com":if(i=q("button"),dp=!0,j=!0,i){i.click();break}case"myimg.club":case"imgmonkey.com":case"imgdragon.com":case"imggold.org":case"levinpic.org":case"imgtown.net":case"0img.ws":case"pixs.cx":case"kropic.com":if(j=!0,dp=!0,(e=document.querySelectorAll("input[type='submit']")).length){let i;for(i=e.length-1;i>=0;i--)if("hidden"!=window.getComputedStyle(e[i]).visibility&&0!=e[i].offsetWidth&&-1==e[i].value.indexOf("eply")&&-1==e[i].value.indexOf("Log")){e[i].removeAttribute("disabled"),e[i].click();break}}case"casimages.com":case"thebestpichost.com":case"ifotos.pl":case"subeimagenes.com":case"lostpix.com":case"vvcap.com":case"imgtrex.com":case"pic-upload.de":case"picusha.net":i=q('img[src*="/img/"]');break;case"imagenetz.de":i=q('img[src*="/img"]');break;case"picatom.com":i=q('img[src*="img/"]');break;case"2pixxsee.ru":case"imgking.xyz":case"imgazure.com":(i=q('img[src*="/img/"]'))&&(i.src=i.src.replace("p.","."));break;case"imgbabes.com":case"imgflare.com":i=q('input[type="submit"]'),dp=!0,j=!0,i?(i.click(),i=null):i=q('img[src*="i.php?"]');break;case"xxxhost.me":case"bilder-hochladen.net":case"dumpt.com":case"imgsin.com":case"loaditup.de":case"123poze.3x.ro":case"thaisharing.online.fr":case"filefap.com":case"imgswift.com":case"1pic.org":i=q('img[src*="/files/"]');break;case"image18.org":i=q('img[src*="/file"]');break;case"picstate.com":i=q("#image_container a img");break;case"zimagez.com":i=q('img[src*="/full/"]');break;case"niceimage.pl":i=q('img[src*="/uploaded/"]');break;case"imagefap.com":find_text_in_scripts('"contentUrl": "','"');break;case"olivepix.com":i=q('img[src*="view/"]');break;case"imgking.co":case"imgkings.com":if(i=q('img[src*="uploads/"]'))break;if(find_text_in_scripts('linkid="','"',!1)){window.location.href=i.src;break}if(-1!=window.location.href.indexOf("imgs")){window.location.href=window.location.href.replace("imgs","imgv");break}if(-1!=window.location.href.indexOf("img3")){window.location.href=window.location.href.replace("img3","img4");break}break;case"imgadult.com":if(j=!0,i=q("a.overlay_ad_link")){i.click();break}case"imagefolks.com":case"imgcandy.net":case"imageteam.org":case"imgnext.com":case"hosturimage.com":case"pixup.us":case"xximg.net":case"x.xximg.net":case"sxpics.nl":case"sxpix.nl":case"bulkimg.info":case"img.yt":case"xxxscreens.com":case"i.sxpics.nl":case"imageon.org":case"nimplus.com":case"imag.nimplus.com":case"newimagepost.com":case"imgease.re":case"fapat.me":case"imgbe.com":case"fireimg.cc":case"rapidimg.net":case"imgtornado.com":case"erimge.com":case"loftlm.ru":case"tinizo.com":case"imgpix.net":case"freeimagehostin.com":case"sximg.nl":case"freephotohostin.com":case"imgpics.nl":case"imagepics.xyz":case"imgwo.com":case"ima.gy":case"picz.site":case"allxpix.com":case"imgblank.com":case"xeimg.yt":case"imgmain.com":case"acidimg.cc":case"imgpart.com":case"picmoza.com":case"imgjazz.xyz":case"picshost.info":case"petrovixxxjav.com":case"placeimg.net":case"imageshtorm.com":case"blameless.work":case"xxx.kodiak.top":case"xaoutchouc.live":case"mshelxxx.ru.com":case"trans.firm.in":case"xxxwebdlxxx.top":case"imgdawgknuttz.com":case"olarixas.xyz":case"beautifulero.com":case"pornhd720p.com":dp=!0,(e=document.getElementsByTagName("input")).length&&(e[e.length-1].removeAttribute("disabled"),e[e.length-1].click());case"fotoszok.pl":case"damimage.com":case"adultur.com":case"croftimage.com":case"imagedecode.com":case"sexyimg.eu":case"gogoimage.org":case"imageblinks.com":case"imglooks.com":case"ocaload.com":case"imgstudio.org":case"goimge.com":case"imageho.me":case"imgor.net":case"icezap.com":case"imgtrial.com":case"dimtus.com":case"imgcat.pw":case"sexyimg.eu":case"imgseed.com":case"imgcredit.xyz":case"pic.hotimg.site":case"xfap.fun":case"xxxwebdlxxx.org":i=q('img[src*="'+iurl+'/upload/"]');break;case"imgboom.net":if(-1!=window.location.href.indexOf("img-")){window.location.href="http://imgboom.net/view.php";break}case"thumbnailus.com":case"imgleveret.com":case"porn84.org":if(i=q('input[type="submit"]'),dp=!0,i){i.click();break}i=q('img[src*="'+iurl+'/upload/"].centred');break;case"imgzulu.com":if(i=q('button[type="submit"]'),dp=!0,i){i.click();break}i=q('img[src*="'+iurl+'/upload/"]');break;case"imgsky.net":case"imgsee.net":case"imgzong.xyz":case"imageking.xyz":case"imgxx.xyz":case"imgao.xyz":case"imgweng.xyz":case"imgkes.xyz":case"imgair.net":case"imgkoi.xyz":case"imglin.xyz":case"imgtigr.xyz":case"imgkr.xyz":case"imgbird.xyz":case"imgwewo.xyz":case"imgirx.xyz":case"imgalor.xyz":case"imgjut.buzz":case"imgtrw.buzz":case"imgveni.xyz":case"imglina.xyz":case"imgkuiw.xyz":case"imgwang.buzz":case"imgmeno.buzz":case"imgpekele.buzz":case"imglqw.buzz":case"imgyng.buzz":case"imgbbd.buzz":case"imgwia.buzz":case"imgkoc.buzz":i=q("button"),dp=!0,j=!0,i&&i.click(),i=q('.big_img_box img[src*="http"]');break;case"picspornfree.me":case"hotimage.uk":case"xxxwebdlxxx.org":case"hdmoza.com":if(i=q('input[type="submit"]'),dp=!0,i){i.click();break}case"image-server.ru":case"avenuexxx.com":case"uploadimagex.com":case"hostingkartinok.com":case"bellazon":case"savepice.ru":i=q('img[src*="/upload"]');break;case"imgseeds.com":if(i=q("input")){i.click();break}case"imghit.com":i=q('img[alt="image"]');break;case"3xplanet.com":i=q('img[alt="picContent"]');break;case"subirimagenes.com":if(i=q('input[type="submit"]'),dp=!0,i){i.click();break}i=q('img[onclick*="scale"]');break;case"image-share.com":case"xpic.biz":i=q('img[src*="upload/"]');break;case"bilder-upload.eu":i=q('input[src*="upload/"]');break;case"picload.org":case"imagecross.com":case"npicture.net":case"public-pic.de":case"picbug.ru":i=q('img[src*="'+iurl+'/image"]');break;case"yande.re":case"konachan.com":case"konachan.net":(i=q('a[href*="'+iurl+'/image"]'))&&(i.src=i.href);break;case"imagesup.net":(i=q('a[href*="/di-"]'))&&(i.src=i.href);break;case"cyberpics.net":case"fastimages.ru":case"hot-file.org":case"image.siroro.co.uk":case"qattach.com":case"fotohelp.kz":case"pic-you.com":(i=q('a[href*="/di/"]'))&&(i.src=i.href);break;case"imagehost.thasnasty.com":case"thepornfeeds.com":case"oxily.com":case"ghanaimages.co":case"knecht.novarata.net":case"img.irandeliver.com":case"xferz.com":case"up.kfesfahan.com":case"image.alesher.com":case"upload.khontai.com":case"image.pantyhosemania.info":case"t.hogor.net":case"your-pictures.net":(i=q('a[href*="?di="]'))&&(i.src=i.href);break;case"pixxxels.org":case"postimg.org":case"postimg.cc":case"pixxxels.cc":j=!0,(i=q('a[href*="?dl="]'))&&(i.src=i.href);break;case"zimage.fr":if(i=q('img[src*="images.php"]')){i.src=i.src.replace(".php?nom=","/");break}case"dumppix.com":if(i=q('a[href*="enter"]')){window.location.href=i.href;break}case"mrjh.org":case"stuffed.ru":case"rapid-img.de":case"ngarko.online.fr":case"freeuploadimages.org":case"picszone.net":case"images.share-films.net":case"bildjunkies.de":case"foto.hcfor.pl":case"pic.tooptarinha.com":case"poopr.org":case"xp-images.hi2.ro":case"dayzeddesigns.com":case"freeimghosting.co.uk":case"upload.removed.us":case"imghost.pl":case"udostepniaj.pl":case"ngarko.free.fr":case"images.collectiontricks.it":case"244pix.com":case"imgboxxx.com":case"imghere.net":case"imgdope.com":case"hostmat.eu":case"imgdream.net":case"imgcentral.com":case"imgroute.com":i=q('img[src*="images/"]');break;case"use.com":(i=q('img[src*="images/"][onload]'))&&(i.src=i.src.replace("/s_2/","/s_5/"));break;case"1y9y.com":case"host4images.com":case"aveimage.com":i=q("img#photo");break;case"freeimgup.com":case"picturevip.com":case"image-load.net":case"upload.djmaster.fr":case"b4he.com":case"firepic.org":case"overdream.cz":case"fastpics.net":case"ii4.ru":case"picuploader.de":case"smages.com":case"pictureshack.ru":case"imgbox.de":case"imagehosting.cz":case"9foto.ru":case"imagesloading.altervista.org":case"phpbbmods.it":case"lakhdaria.net":case"partizansk.eu":case"webjardiner.com":case"imgup.com":case"iezz.com":case"fileaimage.com":case"picturescream.com":case"all-poster.ru":case"extraimage.net":case"imagexxx18.com":case"imgvisits.com":case"imghall.com":i=q('img[src*="/images/"]');break;case"intergranada.com":i=q('img[src*="/images/images/"]');break;case"pixelup.net":i=q('center img[src*="/images/"]');break;case"saveimg.ru":case"imglink.ru":case"4put.ru":case"sharepic.biz":case"you-logo.ru":case"powerlogo.ru":i=q('img[src*="pictures/"]');break;case"xenopix.com":i=q('img[src*="/pix/"]');break;case"chronos.to":case"imgmaid.net":case"pic-maniac.com":case"coreimg.net":case"imx.to":if(j=!0,i=q('input[type="submit"]'),dp=!0,i){i.click();break}case"imgspice.com":case"imagetwist.com":case"dev.imagetwist.com":case"pixroute.com":case"pzy.be":case"funkyimg.com":case"itmages.ru":case"imagenpic.com":case"turbopix.fr":case"pictureturn.com":case"pixic.ru":case"nyanimg.com":case"geekpics.in":case"imageporter.com":case"imagenimage.com":case"imageshimage.com":case"imagedax.net":case"pornimagex.com":case"sendpic.org":case"imagehaha.com":case"picshick.com":case"photo-screen.ru":i=q('img[src*="/i/"]');break;case"imguniversal.com":case"imgclick.net":case"imgsto.com":case"fappic.com":case"imgsen.com":case"premalo.com":case"picdollar.com":case"fotokiz.com":case"silverpic.com":case"pics4upload.com":case"imgstar.eu":i=q("form input[type='submit'][value*='continue to image' i]"),j=!0,dp=!0,i&&i.click(),i=q("img.pic[src*='/i/'], img.pic[src*='/img/']");break;case"scrin.org":if(i=q('a[href*="/i/"]')){i.src=i.href;break}i=q('img[src*="/i/"]');break;case"miragepics.com":(i=q('input[value*="'+iurl+'/images/"]'))&&(i.src=i.value);break;case"ipic.su":(i=q('input[value*="'+iurl+' img/"]'))&&(i.src=i.value);break;case"mixbase.net":i=q('img[src*="media/storage/"]');break;case"image2you.ru":(i=q('img[src*="images/"]'))&&(i.src=i.src.replace("2_",""));break;case"imgmade.com":if(i=q("form"),dp=!0,i){i.submit();break}case"imgdrive.net":case"imgtaxi.com":case"imgwallet.com":if(j=!0,i=q("a.overlay_ad_link")){i.click();break}case"pixhost.to":case"imgtiger.com":case"imgserve.net":case"imgdino.com":case"overpic.net":case"imagesocket.com":case"hostpic.org":case"zapodaj.net":case"jpegshare.net":case"screenshot.ru":case"imagefile.org":case"zapisz.net":case"addyourpics.com":case"imgbank.cz":case"showmyimage.com":case"mynameismiz.com":case"upload.supreme-elite.fr":case"myimg.me":case"heberg-hush.org":case"oltaciyukle.com":case"pichost.name":case"imagend.com":case"imagerocket.com":case"hyyathost.com":case"images.reptilescanada.com":case"wepic.ru":case"upload-image.fr":case"images.baconbits.org":case"kuvajako.com":case"upanh.ovo.vn":case"imagesaur.com":case"wrzucaj.net":case"heberge-images.com":case"image.kg":case"picshome.ru":case"savemyimage.com":case"img.dramacafe.tv":case"fapping.empornium.sx":case"beeimg.com":case"1pics.ru":case"imgshow.me":case"youpicture.org":case"vavvi.com":case"imgzap.com":case"crazyimg.com":case"extraimago.com":case"ftop.ru":case"porncomix.info":case"luxpic.ru":case"passpix.com":case"trumbhost.com":case"imgbros.xyz":i=q('img[src*="'+iurl+'/images/"]');break;case"shareimages.com":case"imagesmax.de":case"bilder.nixhelp.de":i=q('img[src*="'+iurl+'/images"]');break;case"imgfantasy.com":case"imageporn.eu":case"imgsmile.com":case"imgsay.com":case"0img.net":case"imagedisco.net":if(j=!0,dp=!0,i=q('input[value="YES"]')){i.onclick();break}case"pic-upload.de":case"shrani.najdi.si":case"imageab.com":case"turboimagehost.com":i=q('img[onclick*="(this"]');break;case"joblo.com":(i=q("img"))&&(i.src="http://www.joblo.com/moviehotties/images/profile-gallery/orig"+window.location.href.substr(window.location.href.lastIndexOf("/")));break;case"img.folluo.me":case"sizzlingclicks.com":case"imgsha.com":i=q('img[data-load="full"]');break;case"vfl.ru":i=q('img[src*="/ii/"]');break;case"suckmypic.net":i=q("#theImage");break;case"piccy.info":if(i=q('a[href*="/orig/"]'))return void i.click();i=q("img#mainim");break;case"t.me":case"telegram.me":j=!0,document.querySelector("body.body_widget_post")&&1===(e=document.querySelectorAll('.tgme_widget_message_photo_wrap[style*="/file/"]')).length&&((i=e[0]).src=i.style.backgroundImage.slice(4,-1).replace(/"/g,""),window.self!==window.top&&(window.top.location.href=window.self.location.href));break;case"comment-cdn.9gag.com":(i=q("img"))&&(i.src=window.location.hash.substring(1,window.location.hash.length));break;case"xhamster.com":case"xhamster.desi":case"xhamster3.com":case"xhamster4.com":case"xhamster11.com":case"xhamster19.com":j=!0,i=q("div.fotorama__active>img.fotorama__img");break;case"imgtorrnt.in":window.location.replace("https://i.imgur.com/"+window.location.href.substr(window.location.href.lastIndexOf("=")+1));case"trans.firm.in":-1!=window.location.href.search(/\.(?:jpe?g|png|gif|webp)\.html$/i)&&(i={src:window.location.href.replace(".html","")});break;default:switch(host.substr(host.indexOf(".")+1)){case"xhamster.com":case"xhamster.desi":case"xhamster3.com":case"xhamster4.com":case"xhamster11.com":case"xhamster19.com":j=!0,i=q("div.fotorama__active>img.fotorama__img");break;case"tumblr.com":case"media.tumblr.com":(i=document.querySelector('meta[property="og:image"]'))?i.src=i.content:i=document.querySelector("div#base-container > div > div > div > div > img");break;case"wikipedia.org":case"wikimedia.org":(i=q('a[href*="/upload"]'))&&(i.src=i.href);break;case"imgcredit.xyz":i=q('img[src*="/upload/"]');break;case"photobucket.com":find_text_in_scripts('originalUrl":"','"');break;case"lostpic.net":(i=document.head.querySelector('link[rel="image_src"]'))&&(i.src=i.href);break;case"freeamateurteens.net":i=q('img[src*="images/"]');break;case"otofotki.pl":i=q('img[src*="/obrazki/"]');break;case"tinypic.com":i=q("img#imgElement");break;case"imagilive.com":if(i=q("a.button")){dp=!0,i.click();break}i=q('img[src*="'+iurl+'"]');break;case"vipr.im":if(j=!0,i=q("a.ddownloader")){i.src=i.href;break}break;default:if(console.warn("HJI is running on a custom website"),"loading"!=document.readyState&&0!=document.images.length){let e=0;for(let i=0;i<document.images.length;i++){if(0==document.images[i].width&&!document.images[i].complete){e=-1;break}document.images[i].width*document.images[i].height>document.images[e].width*document.images[e].height&&(e=i)}(i=document.images[e])&&console.warn("HJI is running on a custom website, showing biggest image")}}}if(!j){if(j=!0,"Attention Required! | Cloudflare"==document.title)return console.warn("Cloudflare MITM guard page. Stopping."),!1;window.addEventListener("beforescriptexecute",onscript,!0)}if(i&&i.src){if(observer.disconnect(),ext_list.indexOf(i.src.split(".").pop().split("?")[0].toLowerCase())>=0)return console.warn("What we found is not an image"),i=null,!1;unsafeWindow.open=null,unsafeWindow.onbeforeunload=null,FireFox?document.replaceChild(document.importNode(document.implementation.createHTMLDocument("").documentElement,!0),document.documentElement):(delete document.write,document.write("<html><head></head><body></body></html>"),document.close(),window.addEventListener("visibilitychange",onVisibilityChange)),ws(),document.head.innerHTML="",sanitize(),window.removeEventListener("beforescriptexecute",onscript,!0),makeimage()}else tb&&clearTimeout(tb),tb=setTimeout(function(){console.warn("Didnt find image, waited "+timeout+" ms to try again. page: "+window.location.href),tb=0,timeout*=2,i=0,makeworld()},timeout)}}function changeCursor(){0===rescaled?orgImgWidth==window.innerWidth&&orgImgHeight<=window.innerHeight||orgImgWidth<=window.innerWidth&&orgImgHeight==window.innerHeight?i.style.cursor="":orgImgWidth>window.innerWidth||orgImgHeight>window.innerHeight?i.style.cursor="zoom-out":i.style.cursor="zoom-in":2===rescaled?orgImgWidth==window.innerWidth&&orgImgHeight==window.innerHeight?i.style.cursor="":orgImgWidth>i.width?i.style.cursor="zoom-in":i.style.cursor="zoom-out":orgImgWidth==window.innerWidth&&orgImgHeight<=window.innerHeight||orgImgWidth<=window.innerWidth&&orgImgHeight==window.innerHeight?i.style.cursor="":orgImgWidth>i.width?i.style.cursor="zoom-in":i.style.cursor="zoom-out",i.height>window.innerHeight?i.style.margin="0px auto":i.style.margin="auto"}function mousedown(e){if(2===e.which)return e.preventDefault(),void e.stopPropagation()}function rescale(e,a){let c,s;if(e)if(void 0===e.y?(c=e.clientX,s=e.clientY):(c=e.x,s=e.y),c-=i.offsetLeft,s-=i.offsetTop,2===e.which)a=!0,e.preventDefault(),e.stopPropagation();else if(3===e.which)return;document.body.style.overflowX="",document.body.style.overflowY="";let o,t=window.scrollMaxY||(document.body.scrollHeight||document.documentElement.scrollHeight)-document.documentElement.clientHeight,r=window.scrollMaxX||(document.body.scrollWidth||document.documentElement.scrollWidth)-document.documentElement.clientWidth,n=window.pageYOffset/t,m=window.pageXOffset/r,g=!1;if(a?2===rescaled?(rescaled=0,i.style.width=orgImgWidth+"px",i.style.height=orgImgHeight+"px"):(o=orgImgWidth/orgImgHeight<window.innerWidth/window.innerHeight,rescaled=2):0!=rescaled?(2===rescaled&&(g=!0),rescaled=0,i.style.width=orgImgWidth+"px",i.style.height=orgImgHeight+"px"):(o=orgImgWidth/orgImgHeight>window.innerWidth/window.innerHeight,rescaled=1),0!=rescaled&&(o?(i.style.width="100%",i.style.height="auto",document.body.style.overflowX="hidden"):(i.style.height="100%",i.style.width="auto",document.body.style.overflowY="hidden")),changeCursor(),!e||g||a&&(!a||t||r))t=window.scrollMaxY||(document.body.scrollHeight||document.documentElement.scrollHeight)-document.documentElement.clientHeight,r=window.scrollMaxX||(document.body.scrollWidth||document.documentElement.scrollWidth)-document.documentElement.clientWidth,window.scrollTo(Math.round(m*r),Math.round(n*t));else{let e=Math.min(window.innerWidth/i.width,window.innerHeight/i.height);window.scrollTo(c/e-window.innerWidth/2,s/e-window.innerHeight/2)}}window.addEventListener("visibilitychange",onVisibilityChange),unsafeWindow.addEventListener=protected_addEventListener,unsafeWindow.document.addEventListener=protected_addEventListener;var ARC=0;function autoresize(){if(i.naturalHeight){orgImgWidth=Math.round(i.naturalWidth/window.devicePixelRatio),orgImgHeight=Math.round(i.naturalHeight/window.devicePixelRatio),i.style.width=orgImgWidth+"px",i.style.height=orgImgHeight+"px";let title=i.src.substr(i.src.lastIndexOf("/")+1);-1!=title.indexOf("?")&&(title=title.substr(0,title.indexOf("?"))),document.title=title+" ("+i.naturalWidth+"x"+i.naturalHeight+")";let InitRescale=!1;cfg_fitWH&&orgImgHeight>window.innerHeight&&orgImgWidth>window.innerWidth?InitRescale=!0:cfg_fitB&&(orgImgHeight>window.innerHeight||orgImgWidth>window.innerWidth)?InitRescale=!0:cfg_fitS&&orgImgHeight<=window.innerHeight&&orgImgWidth<=window.innerWidth&&(InitRescale=!0),InitRescale?rescale(null,!!cfg_fitOS):changeCursor(),cfg_js&&eval(cfg_js)}else ARC++,ARC<1e3?(75!=ARC&&300!=ARC&&999!=ARC||(i.src=i.src,console.warn("HJI: Trying to reload the image, "+ARC)),unsafeWindow.setTimeout(autoresize,10)):console.warn("HJI: Gave up trying to reload the image, it is broken")}var observer=new MutationObserver(function(){makeworld()}),loadCfg;if(observer.observe(document,{subtree:!0,childList:!0}),void 0===KeyEvent)var KeyEvent={DOM_VK_SPACE:32,DOM_VK_LEFT:37,DOM_VK_UP:38,DOM_VK_RIGHT:39,DOM_VK_DOWN:40,DOM_VK_A:65,DOM_VK_D:68,DOM_VK_P:80,DOM_VK_Q:81,DOM_VK_R:82,DOM_VK_S:83,DOM_VK_W:87,DOM_VK_NUMPAD2:98,DOM_VK_NUMPAD4:100,DOM_VK_NUMPAD5:101,DOM_VK_NUMPAD6:102,DOM_VK_NUMPAD8:104,DOM_VK_F5:116,DOM_VK_TAB:9,DOM_VK_ENTER:13};function cancelEvent(e){return(e=e||window.event).stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.cancel=!0,e.returnValue=!1,!1}function scroll_space(e,i){let a=Math.round(.5*(i?window.innerHeight:window.innerWidth)*(e?-1:1));i?window.scrollBy(a,0):window.scrollBy(0,a)}function onkeydown(e){let a=window.event?e.keyCode:e.which;if(e.ctrlKey&&a==KeyEvent.DOM_VK_S)return cancelEvent(e),void(i&&((a=protected_createElement("a")).href=i.src,a.download="",document.body.appendChild(a),a.click(),document.body.removeChild(a)));if(e.altKey||e.metaKey||e.ctrlKey&&a!=KeyEvent.DOM_VK_SPACE&&a!=KeyEvent.DOM_VK_F5&&a!=KeyEvent.DOM_VK_R)return;let c=Math.round(.1*window.innerHeight);switch(a){case KeyEvent.DOM_VK_RIGHT:case KeyEvent.DOM_VK_D:case KeyEvent.DOM_VK_NUMPAD6:window.scrollBy(c,0),cancelEvent(e);break;case KeyEvent.DOM_VK_LEFT:case KeyEvent.DOM_VK_A:case KeyEvent.DOM_VK_NUMPAD4:window.scrollBy(-1*c,0),cancelEvent(e);break;case KeyEvent.DOM_VK_W:case KeyEvent.DOM_VK_NUMPAD8:window.scrollBy(0,-1*c),cancelEvent(e);break;case KeyEvent.DOM_VK_S:case KeyEvent.DOM_VK_NUMPAD2:window.scrollBy(0,c),cancelEvent(e);break;case KeyEvent.DOM_VK_SPACE:scroll_space(e.shiftKey,e.ctrlKey),cancelEvent(e);break;case KeyEvent.DOM_VK_TAB:case KeyEvent.DOM_VK_ENTER:rescale(null,!0),cancelEvent(e);break;case KeyEvent.DOM_VK_Q:case KeyEvent.DOM_VK_NUMPAD5:rescale(null,!1),cancelEvent(e);break;case KeyEvent.DOM_VK_P:i&&!FireFox?window.location.href="https://gist.github.com/Owyn/8553d7953d948228e312":cfg(),cancelEvent(e);break;case KeyEvent.DOM_VK_R:e.ctrlKey?window.removeEventListener("beforeunload",onbeforeunload,!0):(sessionStorage.hji=window.location.href,window.location.reload(),cancelEvent(e));break;case KeyEvent.DOM_VK_F5:window.removeEventListener("beforeunload",onbeforeunload,!0)}}function cfg(){if(void 0!==GM.setValue){i&&i.src&&(i.removeEventListener("click",rescale,!0),i.removeEventListener("auxclick",rescale,!0),i.removeEventListener("mousedown",mousedown,!0)),window.removeEventListener("keydown",onkeydown,!0),document.head.innerHTML="",document.body.innerHTML="",ws();let e=protected_createElement("div");e.style.margin="11% auto",e.style.width="444px",e.style.border="solid 1px black",e.style.color="black",e.style.background="silver",e.innerHTML="<b><center>Configuration</center></b><br><input id='hji_cfg_1_direct' type='checkbox'> Open images directly with browser<br><br><input id='hji_cfg_2_bgclr' type='text' size='6'> Background color (empty = default)<br><br>Fit to window images: ( Fill to window instead <input id='hji_cfg_7_fitOS' type='checkbox'> )<br><br><input id='hji_cfg_3_fitWH' type='checkbox'> Larger than window both vertically and horizontally<br><br><input id='hji_cfg_4_fitB' type='checkbox'> Larger than window either vertically or horizontally<br><br><input id='hji_cfg_5_fitS' type='checkbox'> Smaller than window<br><br><center>Custom JS Action:<textarea id='hji_cfg_6_js' style='margin: 0px; width: 400px; height: 50px;'></textarea><br><input id='hji_cfg_save' type='button' value='Save configuration'></center>",document.body.appendChild(e),q("#hji_cfg_1_direct").checked=cfg_direct,q("#hji_cfg_2_bgclr").value=cfg_bgclr,q("#hji_cfg_3_fitWH").checked=cfg_fitWH,q("#hji_cfg_4_fitB").checked=cfg_fitB,q("#hji_cfg_5_fitS").checked=cfg_fitS,q("#hji_cfg_7_fitOS").checked=cfg_fitOS,q("#hji_cfg_6_js").value=cfg_js,q("#hji_cfg_save").addEventListener("click",function(){GM.setValue("directImage",q("#hji_cfg_1_direct").checked),GM.setValue("bgColor",q("#hji_cfg_2_bgclr").value),GM.setValue("fitWH",q("#hji_cfg_3_fitWH").checked),GM.setValue("fitB",q("#hji_cfg_4_fitB").checked),GM.setValue("fitS",q("#hji_cfg_5_fitS").checked),GM.setValue("fitOS",q("#hji_cfg_7_fitOS").checked),GM.setValue("js",q("#hji_cfg_6_js").value),alert("Configuration Saved"),q("#hji_cfg_2_bgclr").value?document.body.bgColor=q("#hji_cfg_2_bgclr").value:document.body.removeAttribute("bgColor")},!0)}else alert("Sorry, userscripts in browser native mode (without a script manager) can't have configurations! Install TamperMonkey extension. (it's a very good userscript manager)")}"undefined"==typeof GM?"undefined"!=typeof GM_getValue?(console.warn("using synchronous GM setting loading"),window.GM={},GM.getValue=GM_getValue,GM.setValue=GM_setValue,loadCfg=function(){cfg_direct=GM.getValue("directImage",!1),cfg_bgclr=GM.getValue("bgColor","grey"),cfg_fitWH=GM.getValue("fitWH",!0),cfg_fitB=GM.getValue("fitB",!1),cfg_fitS=GM.getValue("fitS",!0),cfg_fitOS=GM.getValue("fitOS",!1),cfg_js=GM.getValue("js","")},loadCfg()):(cfg_js="",console.warn("no script manager found - using default settings mode")):(loadCfg=async function(){cfg_direct=await GM.getValue("directImage",!1),cfg_bgclr=await GM.getValue("bgColor","grey"),cfg_fitWH=await GM.getValue("fitWH",!0),cfg_fitB=await GM.getValue("fitB",!1),cfg_fitS=await GM.getValue("fitS",!0),cfg_fitOS=await GM.getValue("fitOS",!1),cfg_js=await GM.getValue("js","")},loadCfg())})();