From 806c265344f7f1db564a9774aae5b59602c5c9c8 Mon Sep 17 00:00:00 2001 From: YFdyh000 Date: Tue, 8 Sep 2015 03:29:38 +0800 Subject: [PATCH] Add @document menus to Insert menu --- content/edit.js | 4 ++++ content/edit.xul | 5 +++++ locale/en-US/edit.dtd | 8 ++++++++ 3 files changed, 17 insertions(+) diff --git a/content/edit.js b/content/edit.js index 308c9bd..09dd763 100644 --- a/content/edit.js +++ b/content/edit.js @@ -17,6 +17,10 @@ var prefs = Services.prefs.getBranch("extensions.stylish."); const CSSXULNS = "@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);"; const CSSHTMLNS = "@namespace url(http://www.w3.org/1999/xhtml);"; +const MOZDOC_URL = "@-moz-document url(http://www.w3.org/) {\n\n};\n"; +const MOZDOC_URL_PREFIX = "@-moz-document url-prefix(http://www.w3.org/Style/) {\n\n};\n"; +const MOZDOC_DOMAIN = "@-moz-document domain(mozilla.org) {\n\n};\n"; +const MOZDOC_REGEXP = "@-moz-document regexp(\"https:.*\") {\n\n};\n"; // Because the edit windows have different URL, we need to do this ourselves to persist the position for all edit windows. // Only do this if we're opened with openDialog, in which case window.opener is set diff --git a/content/edit.xul b/content/edit.xul index 85c4673..e761914 100644 --- a/content/edit.xul +++ b/content/edit.xul @@ -61,6 +61,11 @@ + + + + +