Version Description
- Fixed "a.target.className.indexOf is not a function" bug
Download this release
Release Info
Developer | advancedads |
Plugin | Q2W3 Fixed Widget |
Version | 5.1.7 |
Comparing to | |
See all releases |
Code changes from version 5.1.6 to 5.1.7
- js/q2w3-fixed-widget.js +1 -2
- js/q2w3-fixed-widget.min.js +1 -1
- q2w3-fixed-widget.php +2 -2
- readme.txt +5 -2
js/q2w3-fixed-widget.js
CHANGED
@@ -34,9 +34,8 @@ function q2w3_sidebar_init() {
|
|
34 |
q2w3Refresh = false
|
35 |
var htmlObserver = new MutationObserver(function(mutations) {
|
36 |
mutations.forEach( function(mutation) {
|
37 |
-
if ( q2w3_exclude_mutations_array(q2w3_sidebar_options).indexOf(mutation.target.id) == -1 && mutation.target.className.indexOf('q2w3-fixed-widget-container') == -1 ) {
|
38 |
q2w3Refresh = true;
|
39 |
-
//console.log('Mutation detected!');
|
40 |
}
|
41 |
});
|
42 |
});
|
34 |
q2w3Refresh = false
|
35 |
var htmlObserver = new MutationObserver(function(mutations) {
|
36 |
mutations.forEach( function(mutation) {
|
37 |
+
if ( q2w3_exclude_mutations_array(q2w3_sidebar_options).indexOf(mutation.target.id) == -1 && (!mutation.target.className || typeof(mutation.target.className.indexOf) != "function" || mutation.target.className.indexOf('q2w3-fixed-widget-container') == -1 ) ) {
|
38 |
q2w3Refresh = true;
|
|
|
39 |
}
|
40 |
});
|
41 |
});
|
js/q2w3-fixed-widget.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function q2w3_sidebar_init(){for(var
|
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(),r=jQuery(document).height(),s=e.margin_top;jQuery("#wpadminbar").length&&(s=e.margin_top+jQuery("#wpadminbar").height()),jQuery(".q2w3-widget-clone-"+e.sidebar).remove();for(var n=0;n<e.widgets.length;n++)widget_obj=jQuery("#"+e.widgets[n]),widget_obj.css("position",""),widget_obj.attr("id")?(o[n]=new i,o[n].obj=widget_obj,o[n].clone=widget_obj.clone(),o[n].clone.children().remove(),o[n].clone_id=widget_obj.attr("id")+"_clone",o[n].clone.addClass("q2w3-widget-clone-"+e.sidebar),o[n].clone.attr("id",o[n].clone_id),o[n].clone.css("height",widget_obj.height()),o[n].clone.css("visibility","hidden"),o[n].offset_top=widget_obj.offset().top,o[n].fixed_margin_top=s,o[n].height=widget_obj.outerHeight(!0),o[n].fixed_margin_bottom=s+o[n].height,s+=o[n].height):o[n]=!1;var d,a=0;for(n=o.length-1;n>=0;n--)o[n]&&(o[n].next_widgets_height=a,o[n].fixed_margin_bottom+=a,a+=o[n].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(n=0;n<o.length;n++)o[n]&&_(o[n]);function _(i){var o,s=i.offset_top-i.fixed_margin_top,n=r-e.margin_bottom;e.stop_id&&jQuery("#"+e.stop_id).length&&(n=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(r){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>=n?(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-n)):w>=s?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()):jQuery(document).ready(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.7
|
9 |
Author URI: https://wpadvancedads.com/fixed-widget-wordpress/
|
10 |
*/
|
11 |
|
17 |
|
18 |
const ID = 'q2w3_fixed_widget';
|
19 |
|
20 |
+
const VERSION = '5.1.7';
|
21 |
|
22 |
protected static $sidebars_widgets;
|
23 |
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
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.
|
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.6 =
|
77 |
* linguistic corrections
|
78 |
* cleanup of the options page
|
2 |
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
|
7 |
|
8 |
More attention and a higher ad performance with fixed sticky widgets.
|
9 |
|
73 |
|
74 |
== Changelog ==
|
75 |
|
76 |
+
= 5.1.7 =
|
77 |
+
* Fixed "a.target.className.indexOf is not a function" bug
|
78 |
+
|
79 |
= 5.1.6 =
|
80 |
* linguistic corrections
|
81 |
* cleanup of the options page
|