-
Notifications
You must be signed in to change notification settings - Fork 15
/
obfuscate.min.js
1 lines (1 loc) · 1.58 KB
/
obfuscate.min.js
1
(function(){"use strict";function r(e){return String(+e).charAt(0)==e}function i(e){return e==e.toUpperCase()}function s(e){return e==e.toLowerCase()}function o(e){return n.indexOf(e)>=0}function u(e){var t=/\s/;return t.test(e)}function a(e){return e[Math.floor(Math.random()*e.length)]}function f(n){if(r(n)){return a(t)}if(o(n)||u(n)){return n}var s=a(e);if(i(n)){return s.toUpperCase()}else{return s}}function l(e){var t=e.length;var n=[];for(var r=0;r<t;r++){n[r]=f(e[r])}return n.join("")}function c(e,t){var n=t.split(" ");for(var r=0;r<n.length;r++){n[r]=l(n[r])}return n.join(" ")}function h(e){var t,n;switch(e.nodeType){case 3:var r=c(e,e.nodeValue);e.nodeValue=r;break;case 1:case 9:t=e.firstChild;while(t){n=t.nextSibling;h(t);t=n}break}}function p(e,t){if(!e){e="body"}if(typeof t=="object"){var n=d();if(n){var r=document.createElement("div"),i=false;for(var s=0;s<t.length;s++){r.style[t[s][0]]=t[s][1];i=r.style[t[s][0]];if(t[s][0].indexOf(n)!=0&&!i){t[s][0]=n+v(t[s][0])}}}}else{t=false}var o=document.querySelectorAll(e);for(var s=0;s<o.length;s++){if(t){for(var u=0;u<t.length;u++){o[s].style[t[u][0]]=t[u][1]}}else{h(o[s])}}}function d(){var e=/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/;var t=document.getElementsByTagName("script")[0];for(var n in t.style){if(e.test(n)){return n.match(e)[0].toLowerCase()}}if("WebkitOpacity"in t.style)return"webkit";if("KhtmlOpacity"in t.style)return"khtml";return""}function v(e){e+="";var t=e.charAt(0).toUpperCase();return t+e.substr(1)}var e="abcdefghijklmnopqrstuvwxyz";var t="1234567890";var n="-.,;:_ |<>*+(){}";if(window){window.obfuscate=p}else{p()}})()