[Pkg-mozext-commits] [wot] 110/226: Cleaned command.js from outdated code.
David Prévot
taffit at moszumanska.debian.org
Fri May 1 00:35:41 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository wot.
commit 0c20fa9d2ce56af03ce4f323373ccf92e059597e
Author: Sergey Andryukhin <sorgoz at yandex.com>
Date: Tue Aug 20 11:31:35 2013 +0300
Cleaned command.js from outdated code.
---
content/commands.js | 255 ----------------------------------------------------
1 file changed, 255 deletions(-)
diff --git a/content/commands.js b/content/commands.js
index 9fee0c8..1d68018 100644
--- a/content/commands.js
+++ b/content/commands.js
@@ -175,21 +175,6 @@ var wot_commands =
}
},
-// quicktestify: function(value)
-// {
-// try {
-// if (wot_cache.isok(wot_core.hostname)) {
-// wot_cache.set(wot_core.hostname, "testimony_0",
-// Number(value));
-// wot_cache.set(wot_core.hostname, "pending", true);
-// wot_core.pending[wot_core.hostname] = true;
-// wot_core.update();
-// }
-// } catch (e) {
-// dump("wot_commands.quicktestify: failed with " + e + "\n");
-// }
-// },
-
open_scorecard_link: function()
{
// Opens scorecard in a new tab for the URL selected via context menu
@@ -204,106 +189,6 @@ wot_modules.push({ name: "wot_commands", obj: wot_commands });
var wot_events =
{
-// testimonydown: -1,
-
-// get_slider_pos: function(event, testimony)
-// {
-// var pos = -1;
-// try {
-// var slider = document.getElementById("wot-rating-" +
-// testimony + "-slider");
-// var sld_rule = wot_css.getstyle(WOT_STYLESHEET,
-// ".wot-rating-slider");
-//
-// if (!slider || !sld_rule) {
-// return pos;
-// }
-//
-// /* Calculate testimony value */
-// var sld_w = wot_css.getstyle_numeric(sld_rule, "width");
-//
-// pos = WOT_MAX_REPUTATION * (event.screenX -
-// slider.boxObject.screenX) / sld_w;
-//
-// /* Limit to a valid range */
-// if (pos > WOT_MAX_REPUTATION) {
-// pos = WOT_MAX_REPUTATION;
-// } else if (pos < 0) {
-// pos = 0;
-// }
-//
-// /* Round */
-// pos = (pos / WOT_TESTIMONY_ROUND).toFixed() * WOT_TESTIMONY_ROUND;
-// } catch (e) {
-// dump("wot_events.get_slider_pos: failed with " + e + "\n");
-// pos = -1;
-// }
-// return pos;
-// },
-
-// /* Handles testimony slider events and updates the new pending testimony to
-// query cache */
-// slider_down: function(event, testimony)
-// {
-// try {
-// if (!wot_cache.isok(wot_core.hostname)) {
-// return false;
-// }
-//
-// this.testimonydown = testimony;
-//
-// var pos = this.get_slider_pos(event, testimony);
-// if (pos < 0) {
-// return false;
-// }
-//
-// /* Insert into cache */
-// if (wot_cache.get(wot_core.hostname, "testimony_" +
-// testimony) != pos) {
-// wot_cache.set(wot_core.hostname, "testimony_" +
-// testimony, Number(pos));
-// wot_cache.set(wot_core.hostname, "pending", true);
-// wot_core.pending[wot_core.hostname] = true;
-//
-//// /* Update testimony window */
-//// wot_ui.update_testimonies();
-// }
-//
-// /* Any pending testimonies will be stored in wot_core.update,
-// which is called when the popup window is closed */
-// return true;
-// } catch (e) {
-// dump("wot_events.slider: failed with " + e + "\n");
-// }
-// return false;
-// },
-
-// slider_up: function(event, testimony)
-// {
-// this.testimonydown = -1;
-// return true;
-// },
-
-// slider_move: function(event, testimony)
-// {
-// /* Apparently, there is no way to detect if the mouse button is
-// down besides counting clicks. This means that if the mouse
-// button is released while outside the window, we won't be able
-// to detect it and the slider keeps moving... */
-// if (this.testimonydown == testimony) {
-// this.slider_down(event, testimony);
-// } else {
-// this.testimonydown = -1;
-// if (wot_cache.isok(wot_core.hostname)) {
-// var pos = this.get_slider_pos(event, testimony);
-// if (pos >= 0) {
-// wot_ui.update_testimonies(testimony, pos);
-// }
-// }
-// }
-// return true;
-// },
-
click_button: function(event)
{
try {
@@ -314,145 +199,5 @@ var wot_events =
} catch (e) {
dump("wot_events.click_button: failed with " + e + "\n");
}
- },
-
- /* Hides the popup window */
- popup_hide: function()
- {
- try {
- var popup = document.getElementById("wot-popup");
- if (popup) {
- popup.hidePopup();
- }
- } catch (e) {
- dump("wot_events.popup_hide: failed with " + e + "\n");
- }
- return false;
- },
-
- click_title: function(event) {
- try {
- if (!wot_prefs.enabled) {
- wot_commands.enabled();
- }
- } catch (e) {
- dump("wot_events.click_title: failed with " + e + "\n");
- }
- },
-
- click_help: function(event, i) {
- try {
- var link = document.getElementById("wot-rating-" + i + "-help-link");
- if (link && link.getAttribute("comment") == "true") {
- return this.click_scorecard(event, true);
- }
- } catch (e) {
- dump("wot_events.click_help: failed with " + e + "\n");
- }
- return false;
- },
-
- click_user: function(event, i)
- {
- try {
- var content = document.getElementById("wot-user-" + i + "-content");
-
- if (!content) {
- return false;
- }
-
- var browser = getBrowser();
- if (browser) {
- browser.selectedTab =
- browser.addTab(content.getAttribute("url"));
- this.popup_hide();
- }
- } catch (e) {
- dump("wot_events.click_user: failed with " + e + "\n");
- }
- return false;
- },
-
- click_scorecard: function(event, comment)
- {
- try {
- var action = null;
-
- if (comment) {
- action = WOT_SCORECARD_COMMENT;
- }
-
- if (wot_core.hostname &&
- wot_browser.openscorecard(wot_core.hostname,
- action, WOT_URL_RWVIEWSC)) {
- this.popup_hide();
- }
- } catch (e) {
- dump("wot_events.click_scorecard: failed with " + e + "\n");
- }
- return false;
- },
-
- click_logo: function(event)
- {
- try {
- var browser = getBrowser();
- var url = wot_url.getwoturl("", WOT_URL_RWLOGO);
-
- if (browser && url) {
- browser.selectedTab = browser.addTab(url);
- this.popup_hide();
- }
- } catch (e) {
- dump("wot_events.click_guide: failed with " + e + "\n");
- }
- return false;
- },
-
- click_guide: function(event)
- {
- try {
- var browser = getBrowser();
- if (browser) {
- var url = wot_url.getprefurl("guide", false, null, WOT_URL_RWGUIDE); // getprefurl() already considers context
- browser.selectedTab =
- browser.addTab(url);
- this.popup_hide();
- }
- } catch (e) {
- dump("wot_events.click_guide: failed with " + e + "\n");
- }
- return false;
- },
-
- click_prefs: function(event)
- {
- try {
- var browser = getBrowser();
- if (browser) {
- browser.selectedTab = browser.addTab(wot_url.getprefurl(null, null, null, WOT_URL_RWSETTINGS));
- this.popup_hide();
- }
- } catch (e) {
- dump("wot_events.click_prefs: failed with " + e + "\n");
- }
- return false;
- },
-
- click_message: function(event)
- {
- try {
- if (/^\w+:\/\/.+/.test(wot_api_query.message_url)) {
- var browser = getBrowser();
- if (browser) {
- browser.selectedTab =
- browser.addTab(wot_api_query.message_url);
- this.popup_hide();
- }
- }
- } catch (e) {
- dump("wot_events.click_message: failed with " + e + "\n");
- }
- return false;
}
};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/wot.git
More information about the Pkg-mozext-commits
mailing list