Closed
Bug 810654
Opened 14 years ago
Closed 12 years ago
PageMods should have an exclude option
Categories
(Add-on SDK Graveyard :: General, enhancement, P3)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: evold, Assigned: cbrem)
Details
(Whiteboard: [good first bug])
Attachments
(1 external file, 5 obsolete files)
No description provided.
| Reporter | ||
Updated•14 years ago
|
Severity: normal → enhancement
Priority: -- → P3
| Reporter | ||
Updated•13 years ago
|
Whiteboard: [good first bug]
| Reporter | ||
Comment 1•13 years ago
|
||
The use case for is this that including on a domain is easy, but excluding particular pages from that domain then becomes hard, and you have to do it in the content script. With exclude rules (which user scripts have) this type of use case is simple.
Sound good Irakli?
Flags: needinfo?(rFobic)
Comment 2•13 years ago
|
||
Looks like chrome has that too:
http://developer.chrome.com/extensions/content_scripts.html#match-patterns-globs
Sure that sounds good.
Flags: needinfo?(rFobic)
Comment 3•13 years ago
|
||
Hey guys
I will try solve this bug
Comment 4•13 years ago
|
||
Comment 5•13 years ago
|
||
Attachment #751322 -
Attachment is obsolete: true
Comment 6•13 years ago
|
||
Attachment #751325 -
Attachment is obsolete: true
Updated•13 years ago
|
Assignee: nobody → riadh.chtara
Status: NEW → ASSIGNED
Comment 7•13 years ago
|
||
Comment on attachment 751328 [details] [diff] [review]
patchv3
Riadh, please flag your patches for review or feedback so they don't get overlooked.
Attachment #751328 -
Flags: review?(evold)
Comment 8•13 years ago
|
||
Hey jaws
Sorry for that.
I didn't that.
Bugzilla has many ugly buttons and menus which I never understand what they do, so I just avoid click on them.
:)
Thank you for pushing me to discover Bugzilla.
| Reporter | ||
Comment 9•13 years ago
|
||
Comment on attachment 751328 [details] [diff] [review]
patchv3
Review of attachment 751328 [details] [diff] [review]:
-----------------------------------------------------------------
We'll need some tests, let us know if you'd like some help with this, otherwise the patch is looking good so far.
Attachment #751328 -
Flags: review?(evold) → review-
Comment 10•13 years ago
|
||
Attachment #751328 -
Attachment is obsolete: true
Comment 11•13 years ago
|
||
I'd love to do the tests
Updated•13 years ago
|
Attachment #754860 -
Flags: review?(evold)
| Reporter | ||
Comment 12•13 years ago
|
||
(In reply to riadh.chtara from comment #10)
> Created attachment 754860 [details] [diff] [review]
> page mod test
So I applied this patch the master branch and ran `cfx test -f page-mod` and got the following error:
Running tests on Firefox 21.0/Gecko 21.0 ({ec8030f7-c20a-464f-9b0e-13a3a9e97384}) under darwin/x86.
Error: SyntaxError: missing ] after element list
Traceback (most recent call last):
File "resource://extensions.modules.c58df56a-0a48-4fad-a79e-988b200a9d15-at-jetpack.commonjs.path.tests/test-page-mod.js", line 174, in null
createPageModExcludeTest("about:buildconfig", "*.google.com", true)
0 of 1 tests passed.
Comment 13•13 years ago
|
||
Attachment #754860 -
Attachment is obsolete: true
Attachment #754860 -
Flags: review?(evold)
Attachment #755238 -
Flags: review?(evold)
| Reporter | ||
Comment 14•13 years ago
|
||
(In reply to riadh.chtara from comment #13)
> Created attachment 755238 [details] [diff] [review]
> page mod test
I'm seeing this:
(jetpack-sdk)EVMBPR:jetpack-sdk erik_vold$ cfx test -f page-mod
Using binary at '/Applications/Firefox.app/Contents/MacOS/firefox-bin'.
Using profile at '/var/folders/lc/2v6jzk5525gd4l6zr5hxt2yc0000gn/T/tmpTdASWy.mozrunner'.
Running tests on Firefox 21.0/Gecko 21.0 ({ec8030f7-c20a-464f-9b0e-13a3a9e97384}) under darwin/x86.
.error: addon-sdk: An exception occurred.
TypeError: pattern is undefined
resource://extensions.modules.f9352ec8-8128-4e98-afb3-728bd00c769e-at-jetpack.commonjs.path/sdk/page-mod/match-pattern.js 18
Traceback (most recent call last):
File "resource://extensions.modules.f9352ec8-8128-4e98-afb3-728bd00c769e-at-jetpack.commonjs.path/sdk/timers.js", line 31, in notify
callback.apply(null, args);
File "resource://extensions.modules.f9352ec8-8128-4e98-afb3-728bd00c769e-at-jetpack.commonjs.path/sdk/deprecated/unit-test.js", line 294, in
timer.setTimeout(function() { onDone(self); }, 0);
File "resource://extensions.modules.f9352ec8-8128-4e98-afb3-728bd00c769e-at-jetpack.commonjs.path/sdk/deprecated/unit-test.js", line 470, in
options.onDone(self);
File "resource://extensions.modules.f9352ec8-8128-4e98-afb3-728bd00c769e-at-jetpack.commonjs.path/sdk/deprecated/unit-test.js", line 452, in runNextTest
self.start({test: test, onDone: runNextTest});
File "resource://extensions.modules.f9352ec8-8128-4e98-afb3-728bd00c769e-at-jetpack.commonjs.path/sdk/deprecated/unit-test.js", line 483, in start
this.test.testFunction(this);
File "resource://extensions.modules.f9352ec8-8128-4e98-afb3-728bd00c769e-at-jetpack.commonjs.path.tests/test-page-mod.js", line 1119, in exports["test page-mod on private tab"]
onAttach: function(worker) {
File "resource://extensions.modules.f9352ec8-8128-4e98-afb3-728bd00c769e-at-jetpack.commonjs.path/sdk/page-mod.js", line 273, in exports.PageMod
exports.PageMod = function(options) PageMod(options)
File "resource://extensions.modules.f9352ec8-8128-4e98-afb3-728bd00c769e-at-jetpack.commonjs.path/sdk/deprecated/traits.js", line 114, in Trait
return self.constructor.apply(self, arguments) || self._public;
File "resource://extensions.modules.f9352ec8-8128-4e98-afb3-728bd00c769e-at-jetpack.commonjs.path/sdk/page-mod.js", line 157, in PageMod
exrules.add(exclude);
File "resource://extensions.modules.f9352ec8-8128-4e98-afb3-728bd00c769e-at-jetpack.commonjs.path/sdk/page-mod.js", line 78, in ExRules<.add
}.bind(this)),
File "resource://extensions.modules.f9352ec8-8128-4e98-afb3-728bd00c769e-at-jetpack.commonjs.path/sdk/page-mod.js", line 76, in onAdd
EXRULES[rule] = new MatchPattern(rule);
File "resource://extensions.modules.f9352ec8-8128-4e98-afb3-728bd00c769e-at-jetpack.commonjs.path/sdk/page-mod/match-pattern.js", line 18, in MatchPattern
if (typeof pattern.test == "function") {
| Reporter | ||
Comment 15•13 years ago
|
||
(In reply to riadh.chtara from comment #13)
> Created attachment 755238 [details] [diff] [review]
> page mod test
Could you move this to a github pull request? I see you have an account and appear to know the ropes there already. It's easier for us to review and pull there, also you'll notice you've been writing this patch against older code than is in our master branch.
https://github.com/mozilla/addon-sdk
| Reporter | ||
Comment 16•13 years ago
|
||
Comment on attachment 755238 [details] [diff] [review]
page mod test
I'm sorry I didn't get to this sooner, but the patch has bit rotted, we removed the Traits code used for the Rules class in https://github.com/mozilla/addon-sdk/commit/3d6b2bb395e48072f96339c9a326a4a3ff2700a3#diff-8
So this patch would need to be updated to reflect that change.
Attachment #755238 -
Flags: review?(evold) → review-
Updated•12 years ago
|
Assignee: riadh.chtara → cbrem
| Assignee | ||
Comment 17•12 years ago
|
||
Attachment #755238 -
Attachment is obsolete: true
Attachment #8423424 -
Flags: review?(jsantell)
Comment 18•12 years ago
|
||
Comment on attachment 8423424 [details] [review]
addon-sdk pull request 1489
Great first PR! A few syntax changes and some more tests and I think we can land this. R? me again when it's ready!
Attachment #8423424 -
Flags: review?(jsantell) → review-
| Assignee | ||
Updated•12 years ago
|
Attachment #8423424 -
Flags: review- → review?(jsantell)
Comment 19•12 years ago
|
||
Comment on attachment 8423424 [details] [review]
addon-sdk pull request 1489
Good first patch!
Attachment #8423424 -
Flags: review?(jsantell) → review+
Comment 20•12 years ago
|
||
Commits pushed to master at https://github.com/mozilla/addon-sdk
https://github.com/mozilla/addon-sdk/commit/9a4cbd4cce6c3b20d48520cb32dd244180a1c2fd
Bug 810654: Added 'exclude' option to PageMods.
https://github.com/mozilla/addon-sdk/commit/c49118aa60fcf959534e25f4eed45fd4504db316
Merge pull request #1489 from cbrem/master
Bug 810654 Added 'exclude' option to PageMod., r=@jsantell
Updated•12 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 21•12 years ago
|
||
sweet!
You need to log in
before you can comment on or make changes to this bug.
Description
•