PageSourceSearch

https://greyediting.com/wp-content/themes/vw-writer-blog/js/custom.js?ver=7.1.3

js greyediting.com collected 2026-10-08 07:29:15 UTC 4,048 bytes, 152 lines download raw bytes

1function vw_writer_blog_menu_open_nav() {
2	window.vw_writer_blog_responsiveMenu=true;
3	jQuery(".sidenav").addClass('show');
4}
5function vw_writer_blog_menu_close_nav() {
6	window.vw_writer_blog_responsiveMenu=false;
7 	jQuery(".sidenav").removeClass('show');
8}
9
10jQuery(function($){
11 	"use strict";
12   	jQuery('.main-menu > ul').superfish({
13		delay:       500,
14		animation:   {opacity:'show',height:'show'},  
15		speed:       'fast'
16   	});
17});
18
19jQuery(document).ready(function () {
20	window.vw_writer_blog_currentfocus=null;
21  	vw_writer_blog_checkfocusdElement();
22	var vw_writer_blog_body = document.querySelector('body');
23	vw_writer_blog_body.addEventListener('keyup', vw_writer_blog_check_tab_press);
24	var vw_writer_blog_gotoHome = false;
25	var vw_writer_blog_gotoClose = false;
26	window.vw_writer_blog_responsiveMenu=false;
27 	function vw_writer_blog_checkfocusdElement(){
28	 	if(window.vw_writer_blog_currentfocus=document.activeElement.className){
29		 	window.vw_writer_blog_currentfocus=document.activeElement.className;
30	 	}
31 	}
32 	function vw_writer_blog_check_tab_press(e) {
33		"use strict";
34		e = e || event;
35		var activeElement;
36
37		if(window.innerWidth < 999){
38		if (e.keyCode == 9) {
39			if(window.vw_writer_blog_responsiveMenu){
40			if (!e.shiftKey) {
41				if(vw_writer_blog_gotoHome) {
42					jQuery( ".main-menu ul:first li:first a:first-child" ).focus();
43				}
44			}
45			if (jQuery("a.closebtn.mobile-menu").is(":focus")) {
46				vw_writer_blog_gotoHome = true;
47			} else {
48				vw_writer_blog_gotoHome = false;
49			}
50
51		}else{
52
53			if(window.vw_writer_blog_currentfocus=="responsivetoggle"){
54				jQuery( "" ).focus();
55			}}}
56		}
57		if (e.shiftKey && e.keyCode == 9) {
58		if(window.innerWidth < 999){
59			if(window.vw_writer_blog_currentfocus=="header-search"){
60				jQuery(".responsivetoggle").focus();
61			}else{
62				if(window.vw_writer_blog_responsiveMenu){
63				if(vw_writer_blog_gotoClose){
64					jQuery("a.closebtn.mobile-menu").focus();
65				}
66				if (jQuery( ".main-menu ul:first li:first a:first-child" ).is(":focus")) {
67					vw_writer_blog_gotoClose = true;
68				} else {
69					vw_writer_blog_gotoClose = false;
70				}
71			
72			}else{
73
74			if(window.vw_writer_blog_responsiveMenu){
75			}}}}
76		}
77	 	vw_writer_blog_checkfocusdElement();
78	}
79});
80
81(function( $ ) {
82	jQuery('document').ready(function($){
83	    setTimeout(function () {
84    		jQuery("#preloader").fadeOut("slow");
85	    },1000);
86	});
87
88	$(window).scroll(function(){
89		var sticky = $('.header-sticky'),
90			scroll = $(window).scrollTop();
91
92		if (scroll >= 100) sticky.addClass('header-fixed');
93		else sticky.removeClass('header-fixed');
94	});
95	
96	$(document).ready(function () {
97		$(window).scroll(function () {
98		    if ($(this).scrollTop() > 100) {
99		        $('.scrollup i').fadeIn();
100		    } else {
101		        $('.scrollup i').fadeOut();
102		    }
103		});
104		$('.scrollup i').click(function () {
105		    $("html, body").animate({
106		        scrollTop: 0
107		    }, 600);
108		    return false;
109		});
110	});
111})( jQuery );
112
113
114/*sticky copyright*/
115window.addEventListener('scroll', function() {
116  var sticky = document.querySelector('.copyright-sticky');
117  if (!sticky) return;
118
119  var scrollTop = window.scrollY || document.documentElement.scrollTop;
120  var windowHeight = window.innerHeight;
121  var documentHeight = document.documentElement.scrollHeight;
122
123  var isBottom = scrollTop + windowHeight >= documentHeight-100;
124
125  if (scrollTop >= 100 && !isBottom) {
126    sticky.classList.add('copyright-fixed');
127  } else {
128    sticky.classList.remove('copyright-fixed');
129  }
130});
131
132// Reset setting
133(function ($) {
134    function ResetDemoSettings() {
135        if (!confirm("Are you sure you want to reset all theme settings?")) return;
136
137        $.post(ajaxurl, { 
138            action: 'vw_writer_blog_reset_all_settings' 
139        }, function (response) {
140
141            if (response.success) {
142                alert(response.data.message);
143                location.reload();
144            } else {
145                alert(response.data.message);
146            }
147
148        });
149    }
150
151    window.ResetDemoSettings = ResetDemoSettings;
152})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.