diff options
author | Nik Nyby <nikolas@gnu.org> | 2015-04-02 20:04:34 -0400 |
---|---|---|
committer | Nik Nyby <nikolas@gnu.org> | 2015-04-02 20:04:34 -0400 |
commit | cf62e5b0969d4260dd4cab10ce05ea1f45778ace (patch) | |
tree | 403b2b959b661372287057d8ffa34590b4a7549e | |
parent | f3150037a8cffa24cef6487f1fe69b03a2bdb670 (diff) | |
download | librejsxul-cf62e5b0969d4260dd4cab10ce05ea1f45778ace.tar.lz librejsxul-cf62e5b0969d4260dd4cab10ce05ea1f45778ace.tar.xz librejsxul-cf62e5b0969d4260dd4cab10ce05ea1f45778ace.zip |
Remove draggable complain button functionality
For compatibility with addons.mozila.org.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | data/assets/css/style.css | 2 | ||||
-rw-r--r-- | data/complain/pagemod_finder.js | 38 |
3 files changed, 5 insertions, 38 deletions
@@ -1,3 +1,6 @@ +2015-04-02 Nik Nyby <nikolas@gnu.org> + * Remove the draggable complain banner functionality. + 2015-01-17 Nik Nyby <nikolas@gnu.org> * Include the Eclipse Public License in license definitions. Thanks to Daniel Ziltener for the patch. diff --git a/data/assets/css/style.css b/data/assets/css/style.css index 23cf324..ac93c1b 100644 --- a/data/assets/css/style.css +++ b/data/assets/css/style.css @@ -64,7 +64,7 @@ div { } #librejs-tab-button { - cursor: move; + cursor: pointer; opacity: 0.6; display: block; width: 18px; diff --git a/data/complain/pagemod_finder.js b/data/complain/pagemod_finder.js index 8bd0b2c..3866a18 100644 --- a/data/complain/pagemod_finder.js +++ b/data/complain/pagemod_finder.js @@ -36,7 +36,6 @@ var PageModFinder = function() { this.$infoBox = null; this.isMinimized = true; - this.isDragging = false; }; PageModFinder.prototype.init = function() { @@ -270,45 +269,10 @@ PageModFinder.prototype.addComplaintOverlay = function() { var that = this; this.$button.click(function() { - if (!that.isDragging) { - that.showBox(); - } + that.showBox(); return false; }); - this.$button.on('mousedown', function(e) { - var startPageY = e.pageY; - var baseY = that.$button.offset().top - startPageY; - var windowHeight = $(window).height(); - var buttonHeight = that.$button.height(); - - $(document).on('mousemove.librejs', function(e2) { - if (that.isDragging || e2.pageY !== startPageY) { - var top = baseY + e2.clientY; - if (top < 0) { - top = 0; - } else if ( - top + buttonHeight + that.buttonTop - 6 > windowHeight - ) { - top = windowHeight - buttonHeight - that.buttonTop + 6; - } - that.$button.css({top: top}); - that.isDragging = true; - } - }); - return false; - }); - - $(document).on('mouseup', function() { - $(document).off('mousemove.librejs'); - if (that.isDragging) { - setTimeout(function() { - that.isDragging = false; - }, 10); - return false; - } - }); - $(document).keyup(function(e) { if (that.isMinimized === false) { e.preventDefault(); |