[Pkg-mozext-commits] [greasemonkey] 08/41: Update scriptprefs.js
David Prévot
taffit at moszumanska.debian.org
Thu Apr 30 22:06:32 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository greasemonkey.
commit 030c90d93d9fb979dcda2b89f85f28814bc18040
Author: janekptacijarabaci <janekptacijarabaci at users.noreply.github.com>
Date: Mon Mar 23 13:27:56 2015 +0100
Update scriptprefs.js
---
content/scriptprefs.js | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/content/scriptprefs.js b/content/scriptprefs.js
index 4d7af8a..7b03b52 100644
--- a/content/scriptprefs.js
+++ b/content/scriptprefs.js
@@ -6,9 +6,11 @@ var gScript = GM_util.getService().config.getMatchingScripts(function(script) {
})[0];
var gScriptExcludesEl;
+var gScriptMatchesEl;
var gScriptIncludesEl;
var gTabboxEl;
var gUserExcludesEl;
+var gUserMatchesEl;
var gUserIncludesEl;
var gUserTabEl;
@@ -20,8 +22,10 @@ window.addEventListener('load', function() {
gUserTabEl = gTabboxEl.tabs.getItemAtIndex(0);
gUserIncludesEl = document.getElementById('user-includes');
+ gUserMatchesEl = document.getElementById('user-matches');
gUserExcludesEl = document.getElementById('user-excludes');
gScriptIncludesEl = document.getElementById('script-includes');
+ gScriptMatchesEl = document.getElementById('script-matches');
gScriptExcludesEl = document.getElementById('script-excludes');
gScriptIncludesEl.pages = gScript.includes;
@@ -31,6 +35,19 @@ window.addEventListener('load', function() {
};
gUserIncludesEl.pages = gScript.userIncludes;
+ for (var i = 0; i < gScript.matches.length; i++) {
+ gScriptMatchesEl.addPage(gScript.matches[i].pattern);
+ }
+ /*
+ gScriptMatchesEl.onAddUserExclude = function(url) {
+ gUserExcludeEl.addPage(url);
+ gTabboxEl.selectedTab = gUserTabEl;
+ };
+ */
+ for (var i = 0; i < gScript.userMatches.length; i++) {
+ gUserMatchesEl.addPage(gScript.userMatches[i].pattern);
+ }
+
gScriptExcludesEl.pages = gScript.excludes;
gScriptExcludesEl.onAddUserInclude = function(url) {
gUserIncludesEl.addPage(url);
@@ -42,6 +59,8 @@ window.addEventListener('load', function() {
function onDialogAccept() {
gScript.includes = gScriptIncludesEl.pages;
gScript.userIncludes = gUserIncludesEl.pages;
+ gScript.matches = gScriptMatchesEl.pages;
+ gScript.userMatches = gUserMatchesEl.pages;
gScript.excludes = gScriptExcludesEl.pages;
gScript.userExcludes = gUserExcludesEl.pages;
GM_util.getService().config._changed(gScript, "cludes");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/greasemonkey.git
More information about the Pkg-mozext-commits
mailing list