ShameEyesdroper.user.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Shame Eyesdroper | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match *://*/* | |
// @grant none | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js | |
// @run-at document-start | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
function ShameEyesdroper(){ | |
var textArray = [ | |
'有沙雕正在窥屏', | |
'沙雕窥屏中' | |
]; | |
var randomNumber = Math.floor(Math.random()*textArray.length); | |
var div = document.createElement('div'); | |
var svg='<svg width="600" height="400" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><text style="font-weight:bold;opacity:.2;font-size:72" transform="matrix(.70710678 -.70710678 .70710678 .70710678 -52.549041 262.010392)" x="26.015705" y="220.4375">'+textArray[randomNumber]+'</text></svg>'; | |
var bg_text="url(data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(svg)))+")"; | |
$(div).css({ | |
"z-index":65535, | |
"position":"fixed", | |
"top":0, | |
"left":0, | |
"bottom":0, | |
"right":0, | |
"opacity":0.5, | |
"background-image":bg_text, | |
"background-repeat":"repeat", | |
"background-position":"center", | |
"overflow":"hidden" | |
}); | |
$("body").append(div); | |
}; | |
document.addEventListener("keydown", function(e){ | |
if("F1"===e.key){ | |
ShameEyesdroper(); | |
} | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment