PluginProbe
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder / 1.0.2
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder v1.0.2
3.6.0 3.5.0 trunk 1.0.10 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.6.1 1.0.7 1.0.8 1.0.9 1.1 1.1.1 1.2 1.3 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.5 1.5.1 All 110 releases
buttonizer-multifunctional-button / js / buttonizer.js

buttonizer.js in Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder 1.0.2, at js/buttonizer.js

69 lines 3.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 var buttonizer = {
2 settings: {
3 buttonizerOpened: false,
4 wHeight: 0,
5 scrollBarTop: 0,
6 showAfter: 0,
7 currentPageUrl: '',
8 currentPageTitle: ''
9 },
10 init: function(options) {
11 options = jQuery.extend({
12 scrollBarTop: 0,
13 showAfter: 0,
14 }, options);
15
16 this.settings.scrollBarTop = options.scrollBarTop;
17 this.settings.showAfter = options.showAfter;
18 this.settings.wHeight = Math.max(document.body.scrollHeight, document.body.offsetHeight, document.documentElement.clientHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight);
19
20 document.addEventListener('DOMContentLoaded', this.ready);
21 },
22 ready: function() {
23 if(document.getElementById("buttonizer-sys") != null) {
24 document.addEventListener("click", function(e) {
25 if(buttonizer.settings.buttonizerOpened && !document.getElementById("buttonizer-button").contains(e.target)) {
26 document.getElementById("buttonizer-sys").className = 'buttonizer_inner';
27 buttonizer.settings.buttonizerOpened = false;
28 }
29 }, false);
30
31 document.getElementById("buttonizer-sys").addEventListener("click", function() {
32 if(buttonizer.settings.buttonizerOpened == true) {
33 document.getElementById("buttonizer-sys").className = 'buttonizer_inner';
34 buttonizer.settings.buttonizerOpened = false;
35 }else{
36 document.getElementById("buttonizer-sys").className = 'buttonizer_inner opened';
37 buttonizer.settings.buttonizerOpened = true;
38 }
39 });
40 }
41
42
43 /* Premium Code Stripped by Freemius */
44
45 }
46 }
47
48 function onButtonizerClickEvent(text) {
49 if (typeof ga == 'function') {
50 ga('send', 'event', {
51 eventCategory: 'Buttonizer',
52 eventAction: document.location.href,
53 eventLabel: text
54 });
55 }
56 }
57
58 function onButtonizerButtonFacebook() {
59 window.open('http://www.facebook.com/sharer.php?u='+ buttonizer.settings.currentPageUrl +'&t='+ buttonizer.settings.currentPageTitle +'', 'popupFacebook', 'width=610, height=480, resizable=0, toolbar=0, menubar=0, status=0, location=0, scrollbars=0'); return false;
60 }
61
62 function onButtonizerButtonTwitter() {
63 window.open('https://twitter.com/intent/tweet?text='+ buttonizer.settings.currentPageTitle +'&url='+ buttonizer.settings.currentPageUrl +'', 'popupTwitter', 'width=610, height=480, resizable=0, toolbar=0, menubar=0, status=0, location=0, scrollbars=0'); return false;
64 }
65
66 function onButtonizerButtonLinkedin() {
67 window.open('http://www.linkedin.com/shareArticle?mini=true&url='+ buttonizer.settings.currentPageUrl +'&title='+ buttonizer.settings.currentPageTitle +'&summary='+ buttonizer.settings.currentPageTitle +'', 'popupLinkedIn', 'width=610, height=480, resizable=0, toolbar=0, menubar=0, status=0, location=0, scrollbars=0'); return false;
68 }
69