MediaWiki:Common.js
From Symbol Copy
Note: After saving, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
/* Any JavaScript here will be loaded for all users on every page load. */ var symbolAutoCopy= new Clipboard('.symbol_div_to_copy'); var copy_notif_div=$("#copied_notif_msg"); $(".symbol_div_to_copy").click(function() { //alert( "Handler for .click() called." ); // the_element=$(this); // the_element.css("color", "white"); // thisPos=$(this).position(); // topPos=thisPos.top+ ($(this).outerHeight(true)-copy_notif_div.outerHeight(true))/2; //topPos=thisPos.top + 2; // leftPos=thisPos.left+ ($(this).outerWidth(true)-copy_notif_div.outerWidth(true))/2; // copy_notif_div.css('top',topPos); // copy_notif_div.css('left',leftPos); // copy_notif_div.addClass("disappearing"); // var is_presenting_copied_effect=true; // setTimeout(function () { // copy_notif_div.css('top',-5000); // copy_notif_div.removeClass("disappearing"); // // $(the_element).css('border-color','#ff3300'); // is_presenting_copied_effect=false; // the_element.css("color", "black"); // }, 3000); $(".mymodal").css("width","70%"); showCopyingModalDialog($(this).data("clipboard-text")); }); $(".emojiblock").click(function() { location.href = $(this).find("a").attr('href'); }); function showCopyingModalDialog(theText){ $("#myModal").css("display", "block"); $("#myModal").css("position", "fixed"); $("#myModal").css("visibility", "visible"); var theHTML = "<div><span class='the_copied_text'>"+theText + "</span></div><div><span class='the_copied_text_description'> has been <span class='emphasis'>copied</span>. Please paste anywhere! "; $("#modal_header").html(theHTML); } $("#modal-footer-close").on( "click", function() { $("#myModal").css("display", "none"); }); (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-41694441-13', 'auto'); ga('send', 'pageview'); var _Hasync= _Hasync|| []; _Hasync.push(['Histats.start', '1,3514282,4,0,0,0,00010000']); _Hasync.push(['Histats.fasi', '1']); _Hasync.push(['Histats.track_hits', '']); (function() { var hs = document.createElement('script'); hs.type = 'text/javascript'; hs.async = true; hs.src = ('//s10.histats.com/js15_as.js'); (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(hs); })();