Advertisement
MertcanGokgoz

deobfuscated js

Feb 23rd, 2019
382
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. window.selectnav = function () {
  2.     "use strict";
  3.     var e = function (e, t) {
  4.         function c(e) {
  5.             var t;
  6.             if (!e) e = window.event;
  7.             if (e.target) t = e.target;
  8.             else if (e.srcElement) t = e.srcElement;
  9.             if (t.nodeType === 3) t = t.parentNode;
  10.             if (t.value) window.location.href = t.value
  11.         }
  12.         function h(e) {
  13.             var t = e.nodeName.toLowerCase();
  14.             return t === "ul" || t === "ol"
  15.         }
  16.         function p(e) {
  17.             for (var t = 1; document.getElementById("selectnav" + t); t++);
  18.             return e ? "selectnav" + t : "selectnav" + (t - 1)
  19.         }
  20.         function d(e) {
  21.             a++;
  22.             var t = e.children.length,
  23.                 n = "",
  24.                 l = "",
  25.                 c = a - 1;
  26.             if (!t) {
  27.                 return
  28.             }
  29.             if (c) {
  30.                 while (c--) {
  31.                     l += o
  32.                 }
  33.                 l += " "
  34.             }
  35.             for (var v = 0; v < t; v++) {
  36.                 var m = e.children[v].children[0];
  37.                 if (typeof m !== "undefined") {
  38.                     var g = m.innerText || m.textContent;
  39.                     var y = "";
  40.                     if (r) {
  41.                         y = m.className.search(r) !== -1 || m.parentNode.className.search(r) !== -1 ? f : ""
  42.                     }
  43.                     if (i && !y) {
  44.                         y = m.href === document.URL ? f : ""
  45.                     }
  46.                     n += '<option value="' + m.href + '" ' + y + ">" + l + g + "</option>";
  47.                     if (s) {
  48.                         var b = e.children[v].children[1];
  49.                         if (b && h(b)) {
  50.                             n += d(b)
  51.                         }
  52.                     }
  53.                 }
  54.             }
  55.             if (a === 1 && u) {
  56.                 n = '<option value="">' + u + "</option>" + n
  57.             }
  58.             if (a === 1) {
  59.                 n = '<select class="selectnav" id="' + p(true) + '">' + n + "</select>"
  60.             }
  61.             a--;
  62.             return n
  63.         }
  64.         e = document.getElementById(e);
  65.         if (!e) {
  66.             return
  67.         }
  68.         if (!h(e)) {
  69.             return
  70.         }
  71.         if (!("insertAdjacentHTML" in window.document.documentElement)) {
  72.             return
  73.         }
  74.         document.documentElement.className += " js";
  75.         var n = t || {},
  76.             r = n.activeclass || "active",
  77.             i = typeof n.autoselect === "boolean" ? n.autoselect : true,
  78.             s = typeof n.nested === "boolean" ? n.nested : true,
  79.             o = n.indent || "→",
  80.             u = n.label || ".",
  81.             a = 0,
  82.             f = " selected ";
  83.         e.insertAdjacentHTML("afterend", d(e));
  84.         var l = document.getElementById(p());
  85.         if (l.addEventListener) {
  86.             l.addEventListener("change", c)
  87.         }
  88.         if (l.attachEvent) {
  89.             l.attachEvent("onchange", c)
  90.         }
  91.         return l
  92.     };
  93.     return function (t, n) {
  94.         e(t, n)
  95.     }
  96. }();
  97. $(document).ready(function () {
  98.     selectnav('nav');
  99.     selectnav('nav1')
  100. });
  101. $(document).ready(function () {
  102.     $("#comments").find("img").each(function (t, c) {
  103.         (c = $(c)).attr({
  104.             src: c.attr("src").replace(/s\B\d{2,4}/, "s740")
  105.         }), c.attr("width", 740), c.attr("height", 740)
  106.     })
  107. });
  108. $('#nav').before("<li class='home-child'><a href='/'><i class='fa fa-home'/></a></li>");
  109. $(".search_button").on("click", function (t) {
  110.     t.preventDefault(), $("#search").animate({
  111.         width: "toggle"
  112.     }).focus(), $(".search_button").toggleClass("active")
  113. });
  114. $(document).ready(function () {
  115.     if ($('#mycontent').attr('href') != 'http://www.templatesilk.com/') {
  116.         window.location.href = 'http://www.templatesilk.com/'
  117.     }
  118. });
  119. $('#ts-globe').after("<p style='border-top: 1px solid #eee;background-color:#fff!important;float:left;width:100%;margin:0;padding:28px 0px;color:#555!important;font-size:17px!important;display:block!important;opacity:1!important;visibility:visible!important;'><i class='fa fa-copyright'/> Copyright. All rights reserved. Designed By <a href='http://www.templatesilk.com/' id='mycontent' style='color:#555!important;display:inline-block!important;opacity:1!important;visibility:visible!important;'>TemplateSilk</a></p>");
  120. $(document).ready(function () {
  121.     if ($('#mycontent').attr('href') != 'http://www.templatesilk.com/') {
  122.         window.location.href = 'http://www.templatesilk.com/'
  123.     }
  124. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement