Version Description
- Fixed JavaScript events which were not called in some setups.
Download this release
Release Info
Developer | advancedads |
Plugin | Q2W3 Fixed Widget |
Version | 5.1.9 |
Comparing to | |
See all releases |
Code changes from version 5.1.8 to 5.1.9
- js/q2w3-fixed-widget.js +7 -1
- js/q2w3-fixed-widget.min.js +1 -1
- q2w3-fixed-widget.php +2 -2
- readme.txt +4 -1
js/q2w3-fixed-widget.js
CHANGED
@@ -3,7 +3,13 @@ if ( typeof q2w3_sidebar_options != 'undefined' && q2w3_sidebar_options.length >
|
|
3 |
if ( q2w3_sidebar_options[0].window_load_hook ) {
|
4 |
jQuery(window).load(q2w3_sidebar_init);
|
5 |
} else {
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
}
|
8 |
} else {
|
9 |
console.log('jQuery is not loaded!');
|
3 |
if ( q2w3_sidebar_options[0].window_load_hook ) {
|
4 |
jQuery(window).load(q2w3_sidebar_init);
|
5 |
} else {
|
6 |
+
if (document.readyState!='loading'){
|
7 |
+
q2w3_sidebar_init();
|
8 |
+
}
|
9 |
+
else{
|
10 |
+
//jQuery(document).ready(q2w3_sidebar_init);
|
11 |
+
document.addEventListener('DOMContentLoaded', q2w3_sidebar_init);
|
12 |
+
}
|
13 |
}
|
14 |
} else {
|
15 |
console.log('jQuery is not loaded!');
|
js/q2w3-fixed-widget.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function q2w3_sidebar_init(){for(var e=0;e<q2w3_sidebar_options.length;e++)q2w3_sidebar(q2w3_sidebar_options[e]);jQuery(window).on("resize",function(){for(var e=0;e<q2w3_sidebar_options.length;e++)q2w3_sidebar(q2w3_sidebar_options[e])});var i=function(){for(var e=["WebKit","Moz","O","Ms",""],i=0;i<e.length;i++)if(e[i]+"MutationObserver"in window)return window[e[i]+"MutationObserver"];return!1}();0==q2w3_sidebar_options[0].disable_mo_api&&i?(q2w3Refresh=!1,new i(function(e){e.forEach(function(e){-1!=q2w3_exclude_mutations_array(q2w3_sidebar_options).indexOf(e.target.id)||e.target.className&&"function"==typeof e.target.className.indexOf&&-1!=e.target.className.indexOf("q2w3-fixed-widget-container")||(q2w3Refresh=!0)})}).observe(document.body,{childList:!0,attributes:!0,attributeFilter:["style","class"],subtree:!0}),setInterval(function(){if(q2w3Refresh){for(var e=0;e<q2w3_sidebar_options.length;e++)q2w3_sidebar(q2w3_sidebar_options[e]);q2w3Refresh=!1}},300)):(console.log("MutationObserver not supported or disabled!"),q2w3_sidebar_options[0].refresh_interval>0&&setInterval(function(){for(var e=0;e<q2w3_sidebar_options.length;e++)q2w3_sidebar(q2w3_sidebar_options[e])},q2w3_sidebar_options[0].refresh_interval))}function q2w3_exclude_mutations_array(e){for(var i=new Array,o=0;o<e.length;o++)if(e[o].widgets.length>0)for(var t=0;t<e[o].widgets.length;t++)i.push(e[o].widgets[t]),i.push(e[o].widgets[t]+"_clone");return i}function q2w3_sidebar(e){if(!e)return!1;if(!e.widgets)return!1;if(e.widgets.length<1)return!1;function i(){}e.sidebar||(e.sidebar="q2w3-default-sidebar");var o=new Array,t=jQuery(window).height(),
|
1 |
+
function q2w3_sidebar_init(){for(var e=0;e<q2w3_sidebar_options.length;e++)q2w3_sidebar(q2w3_sidebar_options[e]);jQuery(window).on("resize",function(){for(var e=0;e<q2w3_sidebar_options.length;e++)q2w3_sidebar(q2w3_sidebar_options[e])});var i=function(){for(var e=["WebKit","Moz","O","Ms",""],i=0;i<e.length;i++)if(e[i]+"MutationObserver"in window)return window[e[i]+"MutationObserver"];return!1}();0==q2w3_sidebar_options[0].disable_mo_api&&i?(q2w3Refresh=!1,new i(function(e){e.forEach(function(e){-1!=q2w3_exclude_mutations_array(q2w3_sidebar_options).indexOf(e.target.id)||e.target.className&&"function"==typeof e.target.className.indexOf&&-1!=e.target.className.indexOf("q2w3-fixed-widget-container")||(q2w3Refresh=!0)})}).observe(document.body,{childList:!0,attributes:!0,attributeFilter:["style","class"],subtree:!0}),setInterval(function(){if(q2w3Refresh){for(var e=0;e<q2w3_sidebar_options.length;e++)q2w3_sidebar(q2w3_sidebar_options[e]);q2w3Refresh=!1}},300)):(console.log("MutationObserver not supported or disabled!"),q2w3_sidebar_options[0].refresh_interval>0&&setInterval(function(){for(var e=0;e<q2w3_sidebar_options.length;e++)q2w3_sidebar(q2w3_sidebar_options[e])},q2w3_sidebar_options[0].refresh_interval))}function q2w3_exclude_mutations_array(e){for(var i=new Array,o=0;o<e.length;o++)if(e[o].widgets.length>0)for(var t=0;t<e[o].widgets.length;t++)i.push(e[o].widgets[t]),i.push(e[o].widgets[t]+"_clone");return i}function q2w3_sidebar(e){if(!e)return!1;if(!e.widgets)return!1;if(e.widgets.length<1)return!1;function i(){}e.sidebar||(e.sidebar="q2w3-default-sidebar");var o=new Array,t=jQuery(window).height(),n=jQuery(document).height(),r=e.margin_top;jQuery("#wpadminbar").length&&(r=e.margin_top+jQuery("#wpadminbar").height()),jQuery(".q2w3-widget-clone-"+e.sidebar).remove();for(var s=0;s<e.widgets.length;s++)widget_obj=jQuery("#"+e.widgets[s]),widget_obj.css("position",""),widget_obj.attr("id")?(o[s]=new i,o[s].obj=widget_obj,o[s].clone=widget_obj.clone(),o[s].clone.children().remove(),o[s].clone_id=widget_obj.attr("id")+"_clone",o[s].clone.addClass("q2w3-widget-clone-"+e.sidebar),o[s].clone.attr("id",o[s].clone_id),o[s].clone.css("height",widget_obj.height()),o[s].clone.css("visibility","hidden"),o[s].offset_top=widget_obj.offset().top,o[s].fixed_margin_top=r,o[s].height=widget_obj.outerHeight(!0),o[s].fixed_margin_bottom=r+o[s].height,r+=o[s].height):o[s]=!1;var d,a=0;for(s=o.length-1;s>=0;s--)o[s]&&(o[s].next_widgets_height=a,o[s].fixed_margin_bottom+=a,a+=o[s].height,d||((d=widget_obj.parent()).addClass("q2w3-fixed-widget-container"),d.css("height",""),d.height(d.height())));jQuery(window).off("scroll."+e.sidebar);for(s=0;s<o.length;s++)o[s]&&_(o[s]);function _(i){var o,r=i.offset_top-i.fixed_margin_top,s=n-e.margin_bottom;e.stop_id&&jQuery("#"+e.stop_id).length&&(s=jQuery("#"+e.stop_id).offset().top-e.margin_bottom),o=e.width_inherit?"inherit":i.obj.css("width");var d=!1,a=!1,_=!1;jQuery(window).on("scroll."+e.sidebar,function(n){if(jQuery(window).width()<=e.screen_max_width||jQuery(window).height()<=e.screen_max_height)_||(i.obj.css("position",""),i.obj.css("top",""),i.obj.css("bottom",""),i.obj.css("width",""),i.obj.css("margin",""),i.obj.css("padding",""),widget_obj.parent().css("height",""),jQuery("#"+i.clone_id).length>0&&jQuery("#"+i.clone_id).remove(),_=!0,d=!1,a=!1);else{var w=jQuery(this).scrollTop();w+i.fixed_margin_bottom>=s?(a||(i.obj.css("position","fixed"),i.obj.css("top",""),i.obj.css("width",o),jQuery("#"+i.clone_id).length<=0&&i.obj.before(i.clone),a=!0,d=!1,_=!1),i.obj.css("bottom",w+t+i.next_widgets_height-s)):w>=r?d||(i.obj.css("position","fixed"),i.obj.css("top",i.fixed_margin_top),i.obj.css("bottom",""),i.obj.css("width",o),jQuery("#"+i.clone_id).length<=0&&i.obj.before(i.clone),d=!0,a=!1,_=!1):_||(i.obj.css("position",""),i.obj.css("top",""),i.obj.css("bottom",""),i.obj.css("width",""),jQuery("#"+i.clone_id).length>0&&jQuery("#"+i.clone_id).remove(),_=!0,d=!1,a=!1)}}).trigger("scroll."+e.sidebar)}}"undefined"!=typeof q2w3_sidebar_options&&q2w3_sidebar_options.length>0?window.jQuery?q2w3_sidebar_options[0].window_load_hook?jQuery(window).load(q2w3_sidebar_init):"loading"!=document.readyState?q2w3_sidebar_init():document.addEventListener("DOMContentLoaded",q2w3_sidebar_init):console.log("jQuery is not loaded!"):console.log("q2w3_sidebar_options not found!");
|
q2w3-fixed-widget.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://wpadvancedads.com/fixed-widget-wordpress/
|
|
5 |
Description: Use the fixed widget plugin to create sticky widgets that stay in the visible screen area when the page is scrolled up or down and boost your conversions.
|
6 |
Text Domain: q2w3-fixed-widget
|
7 |
Author: Thomas Maier, Max Bond
|
8 |
-
Version: 5.1.
|
9 |
Author URI: https://wpadvancedads.com/fixed-widget-wordpress/
|
10 |
*/
|
11 |
|
@@ -17,7 +17,7 @@ class q2w3_fixed_widget { // Plugin class
|
|
17 |
|
18 |
const ID = 'q2w3_fixed_widget';
|
19 |
|
20 |
-
const VERSION = '5.1.
|
21 |
|
22 |
protected static $sidebars_widgets;
|
23 |
|
5 |
Description: Use the fixed widget plugin to create sticky widgets that stay in the visible screen area when the page is scrolled up or down and boost your conversions.
|
6 |
Text Domain: q2w3-fixed-widget
|
7 |
Author: Thomas Maier, Max Bond
|
8 |
+
Version: 5.1.9
|
9 |
Author URI: https://wpadvancedads.com/fixed-widget-wordpress/
|
10 |
*/
|
11 |
|
17 |
|
18 |
const ID = 'q2w3_fixed_widget';
|
19 |
|
20 |
+
const VERSION = '5.1.9';
|
21 |
|
22 |
protected static $sidebars_widgets;
|
23 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: webzunft, max-bond, advancedads
|
|
3 |
Tags: fixed widget, sticky widget, sidebar, ads, widget
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 5.2
|
6 |
-
Stable tag: 5.1.
|
7 |
|
8 |
More attention and a higher ad performance with fixed sticky widgets.
|
9 |
|
@@ -73,6 +73,9 @@ There are two options: `Disable Width` and `Disable Height`. They works the same
|
|
73 |
|
74 |
== Changelog ==
|
75 |
|
|
|
|
|
|
|
76 |
= 5.1.8 =
|
77 |
* Fixed JavaScript bug that caused jumping / flickering of fixed widgets.
|
78 |
|
3 |
Tags: fixed widget, sticky widget, sidebar, ads, widget
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 5.2
|
6 |
+
Stable tag: 5.1.9
|
7 |
|
8 |
More attention and a higher ad performance with fixed sticky widgets.
|
9 |
|
73 |
|
74 |
== Changelog ==
|
75 |
|
76 |
+
= 5.1.9 =
|
77 |
+
* Fixed JavaScript events which were not called in some setups.
|
78 |
+
|
79 |
= 5.1.8 =
|
80 |
* Fixed JavaScript bug that caused jumping / flickering of fixed widgets.
|
81 |
|