Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.selectnav = function () {
- "use strict";
- var e = function (e, t) {
- function c(e) {
- var t;
- if (!e) e = window.event;
- if (e.target) t = e.target;
- else if (e.srcElement) t = e.srcElement;
- if (t.nodeType === 3) t = t.parentNode;
- if (t.value) window.location.href = t.value
- }
- function h(e) {
- var t = e.nodeName.toLowerCase();
- return t === "ul" || t === "ol"
- }
- function p(e) {
- for (var t = 1; document.getElementById("selectnav" + t); t++);
- return e ? "selectnav" + t : "selectnav" + (t - 1)
- }
- function d(e) {
- a++;
- var t = e.children.length,
- n = "",
- l = "",
- c = a - 1;
- if (!t) {
- return
- }
- if (c) {
- while (c--) {
- l += o
- }
- l += " "
- }
- for (var v = 0; v < t; v++) {
- var m = e.children[v].children[0];
- if (typeof m !== "undefined") {
- var g = m.innerText || m.textContent;
- var y = "";
- if (r) {
- y = m.className.search(r) !== -1 || m.parentNode.className.search(r) !== -1 ? f : ""
- }
- if (i && !y) {
- y = m.href === document.URL ? f : ""
- }
- n += '<option value="' + m.href + '" ' + y + ">" + l + g + "</option>";
- if (s) {
- var b = e.children[v].children[1];
- if (b && h(b)) {
- n += d(b)
- }
- }
- }
- }
- if (a === 1 && u) {
- n = '<option value="">' + u + "</option>" + n
- }
- if (a === 1) {
- n = '<select class="selectnav" id="' + p(true) + '">' + n + "</select>"
- }
- a--;
- return n
- }
- e = document.getElementById(e);
- if (!e) {
- return
- }
- if (!h(e)) {
- return
- }
- if (!("insertAdjacentHTML" in window.document.documentElement)) {
- return
- }
- document.documentElement.className += " js";
- var n = t || {},
- r = n.activeclass || "active",
- i = typeof n.autoselect === "boolean" ? n.autoselect : true,
- s = typeof n.nested === "boolean" ? n.nested : true,
- o = n.indent || "→",
- u = n.label || ".",
- a = 0,
- f = " selected ";
- e.insertAdjacentHTML("afterend", d(e));
- var l = document.getElementById(p());
- if (l.addEventListener) {
- l.addEventListener("change", c)
- }
- if (l.attachEvent) {
- l.attachEvent("onchange", c)
- }
- return l
- };
- return function (t, n) {
- e(t, n)
- }
- }();
- $(document).ready(function () {
- selectnav('nav');
- selectnav('nav1')
- });
- $(document).ready(function () {
- $("#comments").find("img").each(function (t, c) {
- (c = $(c)).attr({
- src: c.attr("src").replace(/s\B\d{2,4}/, "s740")
- }), c.attr("width", 740), c.attr("height", 740)
- })
- });
- $('#nav').before("<li class='home-child'><a href='/'><i class='fa fa-home'/></a></li>");
- $(".search_button").on("click", function (t) {
- t.preventDefault(), $("#search").animate({
- width: "toggle"
- }).focus(), $(".search_button").toggleClass("active")
- });
- $(document).ready(function () {
- if ($('#mycontent').attr('href') != 'http://www.templatesilk.com/') {
- window.location.href = 'http://www.templatesilk.com/'
- }
- });
- $('#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>");
- $(document).ready(function () {
- if ($('#mycontent').attr('href') != 'http://www.templatesilk.com/') {
- window.location.href = 'http://www.templatesilk.com/'
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement