[Pkg-mozext-commits] [wot] 25/226: prepare for ninja
David Prévot
taffit at moszumanska.debian.org
Fri May 1 00:35:30 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 ab97bcf2269d71cef2014f03229173e3b5fd8930
Author: Sergey Andryukhin <sorgoz at yandex.com>
Date: Mon Jun 11 11:04:55 2012 +0300
prepare for ninja
---
content/config.js | 2 ++
content/search.js | 13 ++++++++++---
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/content/config.js b/content/config.js
index 3f12d03..0bff574 100644
--- a/content/config.js
+++ b/content/config.js
@@ -223,6 +223,7 @@ const wot_prefs_bool = [
[ "show_application_5", false ],
[ "show_search_popup", true ],
[ "use_search_level", false ],
+ [ "ninja_donuts", true ],
[ "warning_unknown_0", false ],
[ "warning_unknown_1", false ],
[ "warning_unknown_2", false ],
@@ -294,5 +295,6 @@ const WOT_SEARCH_CONTENT_RE = "re";
const WOT_SEARCH_CONTENT_FLAGS = "flags";
const WOT_SEARCH_TARGET = "target";
const WOT_SEARCH_POPUP = "popup";
+const WOT_SEARCH_NINJA = "ninja";
var wot_modules = [];
diff --git a/content/search.js b/content/search.js
index fe24af1..ea68b38 100644
--- a/content/search.js
+++ b/content/search.js
@@ -27,7 +27,8 @@ var wot_search =
WOT_SEARCH_URLIGN,
WOT_SEARCH_PRESTYLE,
WOT_SEARCH_SCRIPT,
- WOT_SEARCH_STYLE
+ WOT_SEARCH_STYLE,
+ WOT_SEARCH_NINJA
],
attrint: [
@@ -529,8 +530,14 @@ var wot_search =
return null;
},
- addrating: function(target, content, link)
+ addrating: function(target, content, link, rule)
{
+ var is_ninja = rule.ninja && wot_prefs.ninja_donuts;
+
+ dump("ninja_donuts: " + wot_prefs.ninja_donuts + "\n");
+ dump("is ninja: " + is_ninja + "\n");
+ dump("rule" + JSON.stringify(rule) + "\n");
+
try {
var elem = content.createElement("div");
@@ -819,7 +826,7 @@ var wot_search =
}
if (showrating) {
- this.addrating(target, content, content.links[i]);
+ this.addrating(target, content, content.links[i], rule);
}
content.links[i].setAttribute(this.processed, true);
--
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