Skip to content


Subversion checkout URL

You can clone with
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
Commits on May 31, 2011
@erikvold erikvold <em:version>0.1.2pre</em:version> 86bfe09
@erikvold erikvold - adding some promise helpers Q.and() and Q.chain()
- include() in aboutScriptish.js now returns a promise.
@erikvold erikvold Merge branch 'master' of 59eec7d
@erikvold erikvold - using e84ac09
Commits on Jun 01, 2011
@erikvold erikvold test: Scriptish.isGreasemonkeyable() 70f7a70
@erikvold erikvold Closes #324 until jquery/qunit#111 is closed 578c4de
@erikvold erikvold minor style change to padding in about:scriptish 5c202d3
@supahgreg supahgreg Closes #328 timeout test: clear the second timeout if the first is ca…

(cherry picked from commit 0af13cbc5173e488fc7857e5a901f4c0d0a98fec)
Commits on Jun 04, 2011
@erikvold erikvold - timeout the callback used with the promises returned by Config._loa…
…d* functions so that possible errors in the function don't cause a rejected callback to be called.

- adding a Config.loaded flag which Config._save() checks b4 saving
@erikvold erikvold wrapping Script.isUSOScript in a try/catch in case it throws an error b23431c
@erikvold erikvold set Config.loaded = true only after everything in the callback has ex…
…ecuted without throwing an error
@erikvold erikvold Closes #331 Merge branch 'issue-331' dfe976b
@erikvold erikvold Config.loadBlocklist()'s guts are warpped in a timeout now, b/c if it…
… throws then that shouldn't block w/e called it
@erikvold erikvold restoring save delay code removed in e4a05b3 d7a6ee3
@erikvold erikvold replacing Scriptish.getConfig when the config is loaded 104550a
@supahgreg supahgreg minor change: using classList to add/remove a class 0c9fa1f
@supahgreg supahgreg Closes #335 only display the 'scriptish-list-empty' box if needed
(cherry picked from commit e803a166ec7ad3cd994546c402c0241c03ec9ee1)
@supahgreg supahgreg minor: removing a junk line from config.js 7c5e244
Commits on Jun 05, 2011
@supahgreg supahgreg Closes #337 localize the 'no user scripts installed' box
(cherry picked from commit 917c5c8ededc3c8db6d36c979396b69b067a2ffb)
@erikvold erikvold <em:minVersion>4.0</em:minVersion> for FF 2397eb7
@supahgreg supahgreg minor fix: 'Service' -> 'Services' in modules\scriptish.js 0214edf
@supahgreg supahgreg Closes #339 Adding sv-SE locale. Crediting 'Mikael Hiort af Orns' as …
…the translator.

(cherry picked from commit fa5ee0f)
@erikvold erikvold <em:contributor>Greg Parris;</em:contributor> -> <em…
…:developer>Greg Parris;</em:developer>
@erikvold erikvold Closes #340 setting a explicit width & height for script-options.xul 919ac38
@erikvold erikvold don't delay calling aCallback for Scriptish.getConfig(aCallback) when…
… the config is available; keep script injection time consistent post load
Commits on Jun 06, 2011
@erikvold erikvold Closes #342 removing window unload listener c1f1223
@supahgreg supahgreg Adding 'customIsGreaseableSchemes' to support scripting of non-standa…
…rd schemes.
@supahgreg supahgreg minor style change: using double quotes 7c71104
@supahgreg supahgreg Closes #338 Merge branch 'issue-338' 17d45c9
@erikvold erikvold For #338 changing method of including new schemes to match GM's 8e6b464
@supahgreg supahgreg ordering contributors list alphabetically fc0f78d
@supahgreg supahgreg adding 'Developers' section to about:scriptish d661776
@erikvold erikvold using a slightly faster timeout for @run-at document-idle 7ced7c3
@erikvold erikvold adding a comment about why I'm not using the window's setTimeout for @… a70e5ad
@erikvold erikvold Merge branch 'master' of 1556ddb
@nmaier nmaier Closes #343 Add homepage for nmaier
(cherry picked from commit 2da0425c1f5eb578197af911c536f50b88b26511)
@nmaier nmaier Initial de (German) locale 845d706
@nmaier nmaier Register de locale in chrome.manifest 10d93d0
@nmaier nmaier Add em:translator for de
No em:localized, because this would require to duplicate a lot of stuff such as all em:developer/em:contributor/em:translator and such.
@erikvold erikvold Merge pull request #345 from nmaier/de
German locale (de)
@erikvold erikvold Closes #332 allow users to disable notifications. 70bbbb4
Commits on Jun 07, 2011
@nmaier nmaier The about menu item from the Add-on Manager should open about:scriptish
Possible other consumers of em:aboutURL, too.
Implement this by using a stub XUL "window" that in turn opens a new about:Scriptish tab within the most recent browser.
Do not use window.opener tricks or such, as there is no guarantee the opener will be a browser.
@erikvold erikvold Merge pull request #346 from nmaier/about-menuitem-should-open-aboutS…

The about menu item from the Add-on Manager should open about:scriptish
Commits on Jun 08, 2011
@erikvold erikvold Closes #350 tabBrowser is null error for Scriptish_getBrowserForConte…
@erikvold erikvold bug fix: testIsGMable.js tests failed when a pref like extensions.scr…
…iptish.fileIsGreaseable is not a bool type
@erikvold erikvold test: Scriptish.enabled getter and extensions.scriptish.enabled pref …
…exists and is a bool
@erikvold erikvold test: Scriptish.updateSecurely returns…
…quireSecured and that it's a bool pref
@erikvold erikvold bug fix: Scriptish.updateSecurely should only return a bool ebba8ac
@erikvold erikvold test: Scriptish.getConfig 9c9996b
@nmaier nmaier Rewrite options dialog to use <prefwindow>
<prefwindow> has a lot of advantages, such as platform specific integration that fits user expectations better.

Also add some advanced options:

* Use default locale
* Require built-in certs
* Disable notifications
* LogChrome

The security stuff was moved to the Advanced Pane, while Global Excludes received it's own pane.
Also, the current editor path is now shown within the UI

Icons courtesy of
@nmaier nmaier Fix the Options menu item after the <prefwindow> migration
Using a <prefWindow> now requires a slightly different way to open the dialog.
Added to this, add an Options entry to the Tools menu, for parity with the bToolbar button.
@nmaier nmaier de: Add new <prefwindow> strings 6630451
@nmaier nmaier Fix various issues with about:scriptish
- Fore- and background colors properly set
- Add some more whitespace, as this makes the page more clear
- Limit the width of the page and also the inner-container width of text
- Add some paragraphs and line breaks
- Style more like the in-application pages (e.g. neterror) of Firefox
- /s/Contributors/Credits/ as there is already a Contributors subsection
- Re-organize Credits section: use more columns (depending on size)
- Re-organize Credits section: Do not put emphasis on the homepages by writing the urls explicitly; just make the person text into a link, and put less visual emphasis on the links
@nmaier nmaier Merge pull request #351 from nmaier/use-prefwindow
Rewrite options dialog to use <prefwindow>
@nmaier nmaier Merge pull request #352 from nmaier/about-scriptish-fixes
Fix various issues with about:scriptish
@supahgreg supahgreg options.excludes -> options.pane.excludes for locales that have it 3f6e75e
@nmaier nmaier Add ignoreRedirect argument to GM_xhr
Also add ignoreTempRedirect and ignorePermanentRedirect for more fine-grained control.

Closes #225
@nmaier nmaier Add failOnRedirect and redirectionLimit arguments to GM_xhr
failOnRedirect is the same as redirectionLimit = 0
It will only work on nsIHttpChannels (mainly because there are no redirects specified or implemented in other prototcolls).

failOnRedirect or redirectionLimit will cause an error when redirected (too much) just like a regular redirection loop would.
@nmaier nmaier about:scriptish?test -- style messed up after #352
Closes #353
@erikvold erikvold Closes #353 fixing up the css on about:scriptish?test a bit 28143ef
@erikvold erikvold Merge branch 'master' into issue-353
@erikvold erikvold Merge branch 'issue-353' fe17111
@erikvold erikvold <em:contributor>Nils Maier;</em:contributor> -> <e…
…m:developer>Nils Maier;</em:developer>
Commits on Jun 09, 2011
@erikvold erikvold bug fix: wait for all tests to load before starting them (ie: disable…
… autostart)
@erikvold erikvold test: a couple of Scriptish_log tests efe1814
@erikvold erikvold test: Scriptish_log removes null chars from messages cf77e74
@nmaier nmaier Add description to global excludes prefpane
Closes #354
@nmaier nmaier Allow to enable/disable all schemes.
Also put enabled schemes under a enabledSchemes.* prefBranch and set sane defaults.
http/https schemes are now synonymous, as the difference is not really the prptocol, just the added SSL/TLS encapsulation.
Also, always allow parameterized/queried about:blank, so users do not have to turn on general about: support just to get some sites using about:blank tricks working.
@nmaier nmaier Add enabledSchemes checkboxen to the advanced prefpane 682d912
@nmaier nmaier Put the general schemes on the main prefpane
And keep the advanced, possibly dangerous schemes on the advanced pane. We don't really want n00bs to click them, and if they do, they have been warned :p
@nmaier nmaier Also make <caption> bold within the preference dialog 9720d47
@nmaier nmaier Break the protocol security remark into two
This avoids display (crop) issues due to an overlong line, e.g. on mac
@nmaier nmaier Fix qunit reruns via about:scriptish cb2894c
@nmaier nmaier l10n: Drop "schemes" and typo fixes ad9f5a8
@nmaier nmaier de: add recent preferences strings c313bf3
@supahgreg supahgreg Only run QUnit tests if 'test' param is set.
Also allowing for other parameters.
@supahgreg supahgreg Moving things around in aboutScriptish.css d7b7894
@supahgreg supahgreg Removing the bottom margin from #qunit-header2 b8e199d
@supahgreg supahgreg tweaking the Learn text in about:scriptish 40f2062
@supahgreg supahgreg making the about:scriptish Credits note smaller 0cbe06b
@erikvold erikvold Closes #356 only run qunit tests if the first url param of about:scri…
…ptish is 'test' or 'filter'
@erikvold erikvold <em:contributor>Nils Maier;</em:contributor> -> <e…
…m:developer>Nils Maier;</em:developer>

missed this part in 11483b4
Commits on Jun 10, 2011
@erikvold erikvold adding a 'debug' param to the script c3dc69d
@erikvold erikvold test: adding one test for Scriptish_openInTab defaults ad93abc
@erikvold erikvold Closes #355 using wrong default in testScriptishEnabled.js
Also adding extensions.scriptish.enabled to defaults/preferences/scriptish.js
@erikvold erikvold adding a windowtype='scriptish:install' attribute to the install.xul …
@erikvold erikvold Closes #347 support GM's openInTab's new aLoadInBackground argument ee6a5d2
@erikvold erikvold test: Scriptish_openInTab's aReuse 34b31ff
Commits on Jun 13, 2011
@supahgreg supahgreg Closes #359 Add a 'Save As User Script' option to scratchpad's File menu
(cherry picked from commit f960962)
Commits on Jun 14, 2011
@supahgreg supahgreg Closes #348 use Scriptish_openInTab in aboutStub.xul
(cherry picked from commit 1999646eb3e5032e8b9fc43862bbaeb0f76c32a3)
@erikvold erikvold minor: moving GM_updatingEnabled and GM_generateUUID to GM_api.prototype ca0853d
@erikvold erikvold WIP #341 removed use of Q in config.js, and Config._load* are loading…
… synchronously again
@supahgreg supahgreg modifying Config._load* functions to handle the various 'save' cases e53b870
@erikvold erikvold test: Scriptish_convert2RegExp a0bd72f
@erikvold erikvold test: Scriptish_memoize 34e06e5
@supahgreg supahgreg Use a more reliable way to retrieve URL params in QUnit.
For 'about:scriptish?test', is an empty string.
@supahgreg supahgreg Adding the 'urlbase' option to QUnit. 6c17acc
@supahgreg supahgreg Using QUnit.config.urlbase in aboutScriptish.js bd2810d
@supahgreg supahgreg revert 2f496a5 since the 'test' param will always be set when filteri…
…ng QUnit tests
@supahgreg supahgreg Using default 'qunit-header' behavior now that URL params are working. 3173e96
@supahgreg supahgreg Closes #356 Merge branch 'issue-356' 1afa945
@erikvold erikvold Merge branch 'master' of f40de61
@erikvold erikvold Revert "Adding the 'urlbase' option to QUnit."
This reverts commit 6c17acc.
@erikvold erikvold overwriting QUnit.url() instead of editing qunit.js 49bac64
@erikvold erikvold ignoring keys with no values in QUnit.url() 25e013f
Commits on Jun 15, 2011
@supahgreg supahgreg Closes #82 Display 'reinstall' if a user script is already installed.…
… Also consolidating 'Install' translations into the 'install' key.

(cherry picked from commit 72519a1)
Commits on Jun 18, 2011
@nmaier nmaier Scriptish_getContents broken when NetworkHelper not shipped
Seamonkey (and others?) do not ship the NetworkHelper module, part of
the HUDConsole, hence the Cu.import fails, effectively causing other
missing error handling to render the whole application useless.

As a work-around reimplement the one function Scriptish currently uses
if Cu.import fails.
@nmaier nmaier Official support Seamonkey up to Seamonkey Beta2.2
Closes #367
@nmaier nmaier Fix testToolsMenuItem failure on Seamonkey 0ab4623
Commits on Jun 21, 2011
@supahgreg supahgreg only test global excludes against a URL once per page load f7c8fe8
Commits on Jun 22, 2011
@mrwarper mrwarper Added es-ES locale 85e228a
@mrwarper mrwarper Added es-ES description and translator name 5f96c6e
Commits on Jun 25, 2011
@supahgreg supahgreg Closes #371 Reuse the Scriptish Options window if it is already open,…
… and make it modal for non-instantApply systems.

(cherry picked from commit 897cae67d92335c54c2107196cc792d4fbe72a0e)
Commits on Jun 26, 2011
@erikvold erikvold Closes #341 Merge remote branch 'supahgreg/issue-341' b54d5a8
@erikvold erikvold test fix: testAboutScriptishTestsRan was busted in 3173e96 7673080
@erikvold erikvold Merge remote branch 'mrwarper/master' 187cb4f
@erikvold erikvold adding es-ES translations from Alfredo Fernández Díaz ad77233
@supahgreg supahgreg Adding pt-BR (Brazilian Portuguese), courtesy of Mauro Jos da Silva 752deb8
@supahgreg supahgreg consolidating 'install' translations in pt-BR fb6a98a
@supahgreg supahgreg updating pt-BR to reflect changes in en-US 10780ca
@supahgreg supahgreg updating sv-SE to reflect changes in en-US 32e0630
@supahgreg supahgreg updating ru-RU to reflect changes in en-US 239f6b8
@supahgreg supahgreg updating ja-JP to reflect changes in en-US 875af1a
@supahgreg supahgreg updating de to reflect changes in en-US cc86b47
@supahgreg supahgreg moving some stuff around in the localizations d74cdbd
@erikvold erikvold Closes #362 Merge remote branch 'supahgreg/issue-362' 6e98e08
@erikvold erikvold minor performance tweaks to Config.getMatchingScripts() 3b7e9ea
@supahgreg supahgreg Updating ja-JP using a mix of the previous and Babelzilla translation…
…s. Crediting 'k2jp' as a ja-JP translator.
@supahgreg supahgreg updating es-ES to reflect changes in en-US da2bc72
@supahgreg supahgreg specifying which locale each translator worked on 1c12338
@supahgreg supahgreg Closes #370 Merge branch 'issue-370' e414672
@erikvold erikvold Bug #252 Fix all creations of nsITimer that are locally-scoped and su…
…sceptible to GC before firing.
@erikvold erikvold Merge branch 'master' of 64e1482
Commits on Jun 27, 2011
@erikvold erikvold Closes #372 After upgrading a user script 'installing' message hangs 090afc0
@nmaier nmaier Translate new de-locale strings
Closes #370
@nmaier nmaier Hook up the window console into the script sandbox if possible
Closes #374
@nmaier nmaier Make script errors appear in the corresponding script console.
The trick here is to rewrite errors so that they become nsIScriptError2
instances with a correct window id assigned so that the web console
nsIConsoleListener will pick it up and associate it accordingly.

Disclaimer: inspired by some moz-scratchpad stuff
Closes #375
@supahgreg supahgreg Some more updates to ja-JP from k2jp (BabelZilla) 28a7ee3
@nmaier nmaier Remove variable missed from cleanup f418fbc
@nmaier nmaier Fix var double definition in testScriptishLogger a19e130
@nmaier nmaier Provide user pref for caching script & dep contents
CachedResource added, which at the moment implements cached textContent
that Script and ScriptDependency will use, as they now inherit from CR.

Caching is controlled by the new `cache.enabled` preference, which by
default it set to true.  The Advanced panel now features a checkbox
for the user to access and control the preference.

The regular script modification checks will catch any modified scripts,
so that script editing is still possible without hacks.

Closes #289
@nmaier nmaier Fix Qunit result detail table styles b30f9b0
@nmaier nmaier Consolidate qunit tests a bit
- Test more of cryptoHash according to
  (@nmaier wrote test_hash_algorithms.js)
- A little less global pollution in testCachedResource
@nmaier nmaier Warn about return from main scope in user scripts 517b24c
@nmaier nmaier Make the nsIContentPolicy blazing fast
And less gc-y
@nmaier nmaier Install should re-get the script.
Security consideration: This is not better or worse than before. A
server might push cache-control anyway.
@nmaier nmaier Dynamically inserted iframes (frames?) not processed
Wait for location/src-less frames via DOMContentLoaded. Once we receive
that event, push to `docReady` again and synthetisize another

Closes #298
Commits on Jun 28, 2011
@supahgreg supahgreg Closes #376 <preferences> should be defined in a <prefpane>
(cherry picked from commit 894ca379445c6d1141cfb0ed012961d516cbe8e6)
@nmaier nmaier Avoid stat thrashing
Many nsIFile properties will effectively cause a stat() call, e.g.
lastModifiedTime or fileSize.
As scriptish does regularly check these properties, e.g. when loading a
website, the number of stat() calls should be clammed. This commit clams
such calls to 1 in 1000ms.
Together with the previous CachedResource patch, this might greatly
reduce the disk load where it matters, i.e. during high activity loads.
@nmaier nmaier Put the XUL/DOM localization stuff into a module for reuse fac6bb4
@nmaier nmaier Newscript: use a <grid> and Scriptish_localizeDOM df7ef22
@nmaier nmaier Newscript: Add a "generate id" button 017c8f2
@nmaier nmaier Newscript: Remove unused <label id>s 5463a0e
@nmaier nmaier createUserScriptSource should support any @key.
Also it should not have to care about what data type a specfic
@key-value and simply support a more generic approach
@nmaier nmaier Newscript: support @author 9227688
@nmaier nmaier Scratchpad integration: Make the code comprehensible
Also allow other extensions to check/use `Scratchpad.saveAsUserscript`
@supahgreg supahgreg minor fix: tools undefined in scratchpad.js ee8f36e
@supahgreg supahgreg minor: adding a semicolon cadacd0
@supahgreg supahgreg Correcting include/exclude metadata headers in new user script creation.
Issue introduced by dbbee27
@nmaier nmaier Make gone script disappear after access attempt ceb3d61
@nmaier nmaier Newscript: Validate that name and id are provided
If no name or id are given, accepting the dialog will fail and the
corresponding fields will be highlighted.
Also, the required fields got a placeholder text now, asking the user to
specifiy the text.

(Note: Not using HTML5 Form validation here, as this does not work
reliably when intermixed with XUL)
Commits on Jun 29, 2011
@nmaier nmaier Newscript: generate-id button should now consume a whole column
Also fixes: first instance of the dialog in a session was right-cropped before
due to showing the generate-button only late in the game in a new column
(gecko issue).
@supahgreg supahgreg Don't wrap 'New User Script' includes/excludes to the next line. 39d5960
@supahgreg supahgreg Make it easier to add additional @include's to a New User Script. 9a4ff7b
@supahgreg supahgreg Closes #383 Merge branch 'issue-383' d7118f1
@supahgreg supahgreg Closes #384 Standardize on 'Add-ons Manager', as that is what Mozilla…
… uses.

(cherry picked from commit 86094b14b98bb3ca3b3a0cc5abefdd66068e54ea)
@supahgreg supahgreg minor change: Use the internal '_run-at' when updating from a new scr…
…ipt. Otherwise it will be set to the 'defaultRunAt' value.
@erikvold erikvold test: clicking the toolbar button to enable/disable 1d83f7f
@erikvold erikvold test: Scriptish_getTLDURL b658b0c
@supahgreg supahgreg Adding a few more availability checks. 82480df
Commits on Jun 30, 2011
@erikvold erikvold <em:version>0.1.2</em:version> 4960e21
@erikvold erikvold Merge branch 'master' into staging ea0e203