Skip to content

Commit

Permalink
Merge branch 'staging' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvold committed Sep 23, 2012
2 parents fea6dd5 + 0d1e534 commit aa6ab4d
Show file tree
Hide file tree
Showing 65 changed files with 1,029 additions and 710 deletions.
24 changes: 24 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,24 @@
# Contributing

## Overview

* Code contributions should follow the [style guide](https://github.com/scriptish/scriptish/wiki/JavaScript-Style-Guide).
* Tests may be requested, and eventually will be required.
* All code must be reviewed by a reviewer.
** Sometimes code will need additional reviews.

## Contributing Code

* Check that your [issue](https://github.com/scriptish/scriptish/issues) does not
already exist.
* If it does not yet exist [please create one](https://github.com/scriptish/scriptish/issues/new).
* Make your changes, preferably in a branch named `bug_number`.
* Make sure there is a test in the branch (reverse the order of this for TDD).
* Mention your `branch_name`, with a link to it, in the issue thread.
* Ask for a review from one our reviewers.

## Reviewers

* [@erikvold](https://github.com/erikvold)
* [@supahgreg](https://github.com/supahgreg)
* [@nmaier](https://github.com/nmaier)
3 changes: 1 addition & 2 deletions README.md
Expand Up @@ -6,7 +6,6 @@ Scriptish is a userscript manager for Firefox, forked from Greasemonkey.
# Browsers Supported # Browsers Supported


* Firefox 4+ * Firefox 4+
* Fennec 4+
* Seamonkey 2.1+ * Seamonkey 2.1+




Expand All @@ -17,6 +16,6 @@ Scriptish is a userscript manager for Firefox, forked from Greasemonkey.
* [Addons.Mozilla.Org (AMO)](https://addons.mozilla.org/firefox/addon/scriptish) * [Addons.Mozilla.Org (AMO)](https://addons.mozilla.org/firefox/addon/scriptish)
* [Userscripts](http://userscripts.org) * [Userscripts](http://userscripts.org)
* [Wiki](https://github.com/scriptish/scriptish/wiki) * [Wiki](https://github.com/scriptish/scriptish/wiki)
* [Issues](http://scriptish.lighthouseapp.com/projects/83146-firefox-extension/) * [Issues](https://github.com/scriptish/scriptish/issues)
* [Google Group](http://groups.google.com/group/scriptish) * [Google Group](http://groups.google.com/group/scriptish)
* [Source Code](https://github.com/scriptish/scriptish) * [Source Code](https://github.com/scriptish/scriptish)
2 changes: 1 addition & 1 deletion blocklist.json
@@ -1,3 +1,3 @@
{ {
"uso": [20145, 26062, 35611, 38017, 68219] "uso": [20145, 26062, 35611, 38017, 59744, 68219, 92054, 114457, 128437, 130770]
} }
4 changes: 4 additions & 0 deletions build.sh
Expand Up @@ -56,3 +56,7 @@ if [ "test" != "$1" ]; then
fi fi
cd .. cd ..
rm -rf build rm -rf build

if [ "amo" == "$1" ] || [ "staging" == "$1" ]; then
openssl sha1 "$XPI"
fi
11 changes: 8 additions & 3 deletions extension/chrome.manifest
@@ -1,20 +1,24 @@
# TODO: remove/replace/improve
component {ca39e060-88ab-11df-a4ee-0800200c9a66} components/scriptish.js component {ca39e060-88ab-11df-a4ee-0800200c9a66} components/scriptish.js
contract @scriptish.erikvold.com/scriptish-service;1 {ca39e060-88ab-11df-a4ee-0800200c9a66} contract @scriptish.erikvold.com/scriptish-service;1 {ca39e060-88ab-11df-a4ee-0800200c9a66}
category content-policy @scriptish.erikvold.com/scriptish-service;1 @scriptish.erikvold.com/scriptish-service;1 category content-policy @scriptish.erikvold.com/scriptish-service;1 @scriptish.erikvold.com/scriptish-service;1


# TODO: add this dynamically
component {5f28a810-8094-11e0-b278-0800200c9a66} components/aboutScriptish.js component {5f28a810-8094-11e0-b278-0800200c9a66} components/aboutScriptish.js
contract @mozilla.org/network/protocol/about;1?what=scriptish {5f28a810-8094-11e0-b278-0800200c9a66} contract @mozilla.org/network/protocol/about;1?what=scriptish {5f28a810-8094-11e0-b278-0800200c9a66}


# TODO: REMOVE
content scriptish content/ content scriptish content/
# TODO: register dynamically
resource scriptish modules/ resource scriptish modules/
skin scriptish classic/1.0 skin/ skin scriptish classic/1.0 skin/

style chrome://global/content/customizeToolbar.xul chrome://scriptish/skin/browser.css style chrome://global/content/customizeToolbar.xul chrome://scriptish/skin/browser.css
style chrome://global/content/customizeToolbar.xul chrome://scriptish/content/third-party/firebug/startButton.css style chrome://global/content/customizeToolbar.xul chrome://scriptish/content/third-party/firebug/startButton.css
style chrome://global/content/alerts/alert.xul chrome://scriptish/skin/third-party/alert.css os=Darwin style chrome://global/content/alerts/alert.xul chrome://scriptish/skin/third-party/alert.css os=Darwin


overlay chrome://browser/content/browser.xul chrome://scriptish/content/browser.xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} overlay chrome://browser/content/browser.xul chrome://scriptish/content/browser.xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
overlay chrome://browser/content/browser.xul chrome://scriptish/content/browser.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} overlay chrome://browser/content/browser.xul chrome://scriptish/content/browser.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
overlay chrome://browser/content/browser.xul chrome://scriptish/content/e10s/browser.xul application={a23983c0-fd0e-11dc-95ff-0800200c9a66}
overlay chrome://browser/content/scratchpad.xul chrome://scriptish/content/scratchpad.xul overlay chrome://browser/content/scratchpad.xul chrome://scriptish/content/scratchpad.xul
overlay chrome://navigator/content/navigator.xul chrome://scriptish/content/browser.xul overlay chrome://navigator/content/navigator.xul chrome://scriptish/content/browser.xul
overlay about:addons chrome://scriptish/content/addonstab.xul overlay about:addons chrome://scriptish/content/addonstab.xul
Expand All @@ -26,11 +30,12 @@ overlay chrome://scriptish/content/install.xul chrome://scriptish/content/clo
overlay chrome://scriptish/content/options.xul chrome://scriptish/content/closewindow.xul overlay chrome://scriptish/content/options.xul chrome://scriptish/content/closewindow.xul
overlay chrome://scriptish/content/newscript.xul chrome://scriptish/content/closewindow.xul overlay chrome://scriptish/content/newscript.xul chrome://scriptish/content/closewindow.xul


override chrome://scriptish/content/options.xul chrome://scriptish/content/fennec-options.xul application={a23983c0-fd0e-11dc-95ff-0800200c9a66} # TODO: remove below, do dynamically.

locale scriptish en-US locale/en-US/ locale scriptish en-US locale/en-US/
locale scriptish de locale/de/ locale scriptish de locale/de/
locale scriptish es-ES locale/es-ES/ locale scriptish es-ES locale/es-ES/
locale scriptish he locale/he/
locale scriptish hu locale/hu/
locale scriptish ja-JP locale/ja-JP/ locale scriptish ja-JP locale/ja-JP/
locale scriptish pl locale/pl/ locale scriptish pl locale/pl/
locale scriptish pt-BR locale/pt-BR/ locale scriptish pt-BR locale/pt-BR/
Expand Down
17 changes: 7 additions & 10 deletions extension/components/scriptish.js
@@ -1,3 +1,4 @@
"use strict";
const DESCRIPTION = "ScriptishService"; const DESCRIPTION = "ScriptishService";
const CONTRACTID = "@scriptish.erikvold.com/scriptish-service;1"; const CONTRACTID = "@scriptish.erikvold.com/scriptish-service;1";
const CLASSID = Components.ID("{ca39e060-88ab-11df-a4ee-0800200c9a66}"); const CLASSID = Components.ID("{ca39e060-88ab-11df-a4ee-0800200c9a66}");
Expand Down Expand Up @@ -32,15 +33,11 @@ const RE_USERSCRIPT = /\.user(?:-\d+)?\.js$/;
const RE_CONTENTTYPE = /text\/html/i; const RE_CONTENTTYPE = /text\/html/i;


function ScriptishService() { function ScriptishService() {
if ("Fennec" != Services.appinfo.name) { Scriptish_manager.setup.call(this);
Scriptish_manager.setup.call(this); Services.obs.addObserver(this, "install-userscript", false);
Services.obs.addObserver(this, "install-userscript", false); Services.obs.addObserver(this, "scriptish-enabled", false);
Services.obs.addObserver(this, "scriptish-enabled", false); Services.obs.addObserver(this, "content-document-global-created", false);
Services.obs.addObserver(this, "content-document-global-created", false); Services.obs.addObserver(this, "chrome-document-global-created", false);
Services.obs.addObserver(this, "chrome-document-global-created", false);
} else {
//Services.mm.
}
} }


ScriptishService.prototype = { ScriptishService.prototype = {
Expand Down Expand Up @@ -190,7 +187,7 @@ ScriptishService.prototype = {
"chrome": true, "chrome": true,
"resource": true "resource": true
}, },
_reg_userjs: /\.user\.js$/, _reg_userjs: /^[^#\?=]+\.user\.js$/,
shouldLoad: function(ct, cl, org, ctx, mt, ext) { shouldLoad: function(ct, cl, org, ctx, mt, ext) {
// block content detection of scriptish by denying it chrome: & resource: // block content detection of scriptish by denying it chrome: & resource:
// content, unless loaded from chrome: or about: // content, unless loaded from chrome: or about:
Expand Down
4 changes: 2 additions & 2 deletions extension/content/aboutScriptish.html
Expand Up @@ -45,8 +45,8 @@ <h2>Help Out</h2>
</header> </header>
<p>There are many ways you can help out with Scriptish:</p> <p>There are many ways you can help out with Scriptish:</p>
<ul> <ul>
<li><a href="http://scriptish.lighthouseapp.com/projects/83146/tickets/new">Report a bug</a></li> <li><a href="https://github.com/scriptish/scriptish/issues/new">Report a bug</a></li>
<li><a href="http://scriptish.lighthouseapp.com/projects/83146/tickets/new">Request a feature</a></li> <li><a href="https://github.com/scriptish/scriptish/issues/new">Request a feature</a></li>
<li>Like coding? <a href="https://github.com/scriptish/scriptish">Collaborate!</a></li> <li>Like coding? <a href="https://github.com/scriptish/scriptish">Collaborate!</a></li>
</ul> </ul>
</section> </section>
Expand Down
67 changes: 0 additions & 67 deletions extension/content/e10s/browser-content.js

This file was deleted.

126 changes: 0 additions & 126 deletions extension/content/e10s/browser.js

This file was deleted.

20 changes: 0 additions & 20 deletions extension/content/e10s/browser.xul

This file was deleted.

8 changes: 0 additions & 8 deletions extension/content/fennec-options.xul

This file was deleted.

3 changes: 3 additions & 0 deletions extension/content/js/browser.js
Expand Up @@ -254,6 +254,9 @@ Scriptish_BrowserUI.reattachMenuCmds = function() {
*/ */
Scriptish_BrowserUI.chromeUnload = function() { Scriptish_BrowserUI.chromeUnload = function() {
gBrowser.removeProgressListener(this); gBrowser.removeProgressListener(this);
// kill reference to this document
this.menuCommanders.forEach(function({commander}) commander.destroy());
// kill reference to menuCommanders
delete this.menuCommanders; delete this.menuCommanders;
} }


Expand Down
6 changes: 4 additions & 2 deletions extension/content/js/newscript.js
Expand Up @@ -87,8 +87,10 @@ function doInstall() {
// put this created script into a file -- only way to install it // put this created script into a file -- only way to install it
var tempFile = Scriptish_getTempFile(); var tempFile = Scriptish_getTempFile();
var foStream = Scriptish_getWriteStream(tempFile); var foStream = Scriptish_getWriteStream(tempFile);
foStream.write(script, script.length); var converter = Instances.cos;
foStream.close(); converter.init(foStream, "UTF-8", 0, 0);
converter.writeString(script);
converter.close(); // this closes foStream


// create a script object with parsed metadata, // create a script object with parsed metadata,
script = Scriptish_config.parse(script); script = Scriptish_config.parse(script);
Expand Down

1 comment on commit aa6ab4d

@radar08
Copy link

@radar08 radar08 commented on aa6ab4d Nov 3, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test

Please sign in to comment.