webapps-greasemonkey-2.3.6+13.10.20130920.1/ 0000755 0000157 0000170 00000000000 12217153531 020341 5 ustar pbuser pbgroup 0000000 0000000 webapps-greasemonkey-2.3.6+13.10.20130920.1/.gitignore 0000644 0000157 0000170 00000000031 12217153363 022326 0 ustar pbuser pbgroup 0000000 0000000 *.xpi
.project
.settings
webapps-greasemonkey-2.3.6+13.10.20130920.1/CREDITS 0000644 0000157 0000170 00000002100 12217153363 021355 0 ustar pbuser pbgroup 0000000 0000000 Greasemonkey is Open Source, released under the terms of the MIT license;
see the LICENSE.mit file.
Greasemonkey contains code derived from AdBlock ( http://adblock.mozdev.org/ ),
reused under the terms of the MPL license; see LICENSE.mpl.
Greasemonkey contains code derived from FireBug ( http://getfirebug.com/ ),
reused under the terms of the BSD license; see LICENSE.bsd.
Greasemonkey contains code derived from SlipperyMonkey, originally by
Dave Townsend, reused under the terms of the MIT license.
( http://www.oxymoronical.com/blog/2010/07/How-to-extend-the-new-Add-ons-Manager )
Greasemonkey contains code derived from Scriptish
( https://github.com/scriptish/scriptish ), reused under the terms of the MIT
license.
Greasemonkey also contains code derived from Mozilla projects, including
Firefox ( http://mozilla.org/ ), reused under the MPL license; see the
LICENSE.mpl file.
All MPL code is located in the content/third-party/ and modules/third-party/
and skin/third-party/ directories, and all such files contain the appropriate
licensing disclaimers and notifications.
webapps-greasemonkey-2.3.6+13.10.20130920.1/content/ 0000755 0000157 0000170 00000000000 12217153531 022013 5 ustar pbuser pbgroup 0000000 0000000 webapps-greasemonkey-2.3.6+13.10.20130920.1/content/browser.xul 0000644 0000157 0000170 00000000365 12217153363 024237 0 ustar pbuser pbgroup 0000000 0000000
webapps-greasemonkey-2.3.6+13.10.20130920.1/content/browser.js 0000644 0000157 0000170 00000007631 12217153363 024046 0 ustar pbuser pbgroup 0000000 0000000 Components.utils.import('resource://unity_webapps/utils.js');
// this file is the JavaScript backing for the UI wrangling which happens in
// browser.xul. It also initializes the Greasemonkey singleton which contains
// all the main injection logic, though that should probably be a proper XPCOM
// service and wouldn't need to be initialized in that case.
function UW_BrowserUI() {};
/**
* nsISupports.QueryInterface
*/
UW_BrowserUI.QueryInterface = function(aIID) {
if (!aIID.equals(Components.interfaces.nsISupports) &&
!aIID.equals(Components.interfaces.nsIObserver) &&
!aIID.equals(Components.interfaces.nsISupportsWeakReference))
throw Components.results.NS_ERROR_NO_INTERFACE;
return UW_BrowserUI;
};
UW_BrowserUI.init = function() {
window.addEventListener("load", UW_BrowserUI.chromeLoad, false);
};
UW_BrowserUI.progressListener = {
onLocationChange:function(aBrowser, aProgress, aRequest, aURI) {
if (aProgress.isLoadingDocument) {
UW_BrowserUI.gmSvc.runScripts(
'document-start', aProgress.DOMWindow, window);
}
},
onStateChange:function() { },
onProgressChange:function() { },
onStatusChange:function() { },
onSecurityChange:function() { },
onLinkIconAvailable:function() { }
};
/**
* The browser XUL has loaded. Find the elements we need and set up our
* listeners and wrapper objects.
*/
UW_BrowserUI.chromeLoad = function(e) {
// Store DOM element references in this object, also for use elsewhere.
UW_BrowserUI.tabBrowser = document.getElementById("content");
UW_BrowserUI.bundle = document.getElementById("uw-browser-bundle");
// Use the appcontent element specifically, see #1344.
document.getElementById("appcontent")
.addEventListener("DOMContentLoaded", UW_BrowserUI.contentLoad, true);
gBrowser.addEventListener("pagehide", UW_BrowserUI.pagehide, true);
gBrowser.addEventListener("pageshow", UW_BrowserUI.pageshow, true);
var sidebar = document.getElementById("sidebar");
sidebar.addEventListener("DOMContentLoaded", UW_BrowserUI.contentLoad, true);
sidebar.addEventListener("pagehide", UW_BrowserUI.pagehide, true);
sidebar.addEventListener("pageshow", UW_BrowserUI.pageshow, true);
var observerService = Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService);
observerService.addObserver(UW_BrowserUI, "inner-window-destroyed", true);
// we use this to determine if we are the active window sometimes
UW_BrowserUI.winWat = Components
.classes["@mozilla.org/embedcomp/window-watcher;1"]
.getService(Components.interfaces.nsIWindowWatcher);
UW_BrowserUI.gmSvc = UW_util.getService();
gBrowser.addTabsProgressListener(UW_BrowserUI.progressListener);
};
UW_BrowserUI.contentLoad = function(event) {
var safeWin = event.target.defaultView;
var href = safeWin.location.href;
// Make sure we are still on the page that fired this event, see issue #1083.
// But ignore hashes; see issue #1445.
if (href.replace(/#.*/, '') == event.target.documentURI.replace(/#.*/, '')) {
UW_BrowserUI.gmSvc.runScripts('document-end', safeWin, window);
}
};
UW_BrowserUI.pagehide = function(aEvent) {
var windowId = UW_util.windowIdForEvent(aEvent);
if (aEvent.persisted) {
UW_BrowserUI.gmSvc.contentFrozen(windowId);
} else {
UW_BrowserUI.gmSvc.contentDestroyed(windowId);
}
};
UW_BrowserUI.pageshow = function(aEvent) {
var windowId = UW_util.windowIdForEvent(aEvent);
UW_BrowserUI.gmSvc.contentThawed(windowId);
};
UW_BrowserUI.observe = function(subject, topic, data) {
if (topic == "dom-window-destroyed") {
UW_BrowserUI.gmSvc.contentDestroyed(UW_util.windowId(subject));
} else if (topic == "inner-window-destroyed") {
UW_BrowserUI.gmSvc.contentDestroyed(
subject.QueryInterface(Components.interfaces.nsISupportsPRUint64).data);
} else {
throw new Error("Unexpected topic received: {" + topic + "}");
}
};
UW_BrowserUI.init();
webapps-greasemonkey-2.3.6+13.10.20130920.1/idl/ 0000755 0000157 0000170 00000000000 12217153531 021111 5 ustar pbuser pbgroup 0000000 0000000 webapps-greasemonkey-2.3.6+13.10.20130920.1/idl/uwIGreasemonkeyService.idl 0000644 0000157 0000170 00000000364 12217153363 026250 0 ustar pbuser pbgroup 0000000 0000000 #include "nsISupports.idl"
[scriptable, uuid(3bc67a20-2722-11e1-bfc2-0800200c9a66)]
interface uwIGreasemonkeyService : nsISupports
{
void runScripts(in string aRunWhen,
in nsISupports aWrappedContentWin, in nsISupports aChromeWin);
};
webapps-greasemonkey-2.3.6+13.10.20130920.1/modules/ 0000755 0000157 0000170 00000000000 12217153531 022011 5 ustar pbuser pbgroup 0000000 0000000 webapps-greasemonkey-2.3.6+13.10.20130920.1/modules/runScript.js 0000644 0000157 0000170 00000002522 12217153363 024344 0 ustar pbuser pbgroup 0000000 0000000 function UW_runScript(code, sandbox, maxJSVersion) { Components.utils.evalInSandbox(code, sandbox, maxJSVersion); }
// NOTE:
// This function is intentionally contained completely within line one.
// This is used to grant the a predictable file/line numbers to exceptions
// raised inside the eval.
//
// This is a workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=307984
//
// Users: If you see an error coming from this file, that's because we haven't
// yet found a way to work around the bug completely. If you have asynchronous
// code (setTimeout, any kind of event listener or UW_xmlhttpRequest callback),
// any errors within it will be reported as coming from this file at one line
// number higher than the real the line within your script (and any prepended
// @require files).
//
// For example, this script:
// https://gist.github.com/1154205
// Generated an line in the error console like:
// Error: undefined is not a function
// Source File: resource://unity_webapps/runScript.js
// Line: 27
// This error is actually from line 26 of the script which indeed is
// "undefined();" and guaranteed to cause an error. Because it was called
// inside a setTimeout(), we were unable to catch and fix the error.
//
var EXPORTED_SYMBOLS = ["UW_runScript", "UW_runScript_filename"];
UW_runScript_filename = Components.stack.filename;
webapps-greasemonkey-2.3.6+13.10.20130920.1/modules/utils.js 0000644 0000157 0000170 00000004016 12217153363 023513 0 ustar pbuser pbgroup 0000000 0000000 var EXPORTED_SYMBOLS = [ 'UW_util' ];
const UW_SERVICE = Components
.classes["@unity_webapps.mozdev.org/unity_webapps-service;1"]
.getService(Components.interfaces.uwIGreasemonkeyService)
.wrappedJSObject;
const ioService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
var UW_util = {
getService: function() {
return UW_SERVICE;
},
logError: function(e) {
dump(e + '\n');
},
isGreasemonkeyable: function(url) {
var scheme = ioService.extractScheme(url);
switch (scheme) {
case "http":
case "https":
case "ftp":
case "data":
case "file":
return true;
}
return false;
},
windowId: function(win) {
try {
// Do not operate on chrome windows.
win.QueryInterface(Components.interfaces.nsIDOMChromeWindow);
return null;
} catch (e) {
// We want this to fail. Catch is no-op.
}
try {
// Dunno why this is necessary, but sometimes we get non-chrome windows
// whose locations we cannot access.
var href = win.location.href;
if (!UW_util.isGreasemonkeyable(href)) return null;
} catch (e) {
return null;
}
var domWindowUtils = win
.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIDOMWindowUtils);
var windowId;
try {
windowId = domWindowUtils.currentInnerWindowID;
} catch (e) { }
if ('undefined' == typeof windowId) {
// Firefox <4.0 does not provide this, use the document instead.
// (Document is a property of the window, and should let us dig into the
// "inner window" rather than always getting the same "outer window", due
// to bfcache. https://developer.mozilla.org/en/Inner_and_outer_windows )
return win.document;
}
return windowId;
},
windowIdForEvent: function(aEvent) {
var doc = aEvent.originalTarget;
try {
doc.QueryInterface(Components.interfaces.nsIDOMHTMLDocument);
} catch (e) {
return null;
}
return UW_util.windowId(doc.defaultView);
}
};
webapps-greasemonkey-2.3.6+13.10.20130920.1/components/ 0000755 0000157 0000170 00000000000 12217153531 022526 5 ustar pbuser pbgroup 0000000 0000000 webapps-greasemonkey-2.3.6+13.10.20130920.1/components/unity_webapps.js 0000644 0000157 0000170 00000043041 12217153363 025762 0 ustar pbuser pbgroup 0000000 0000000 // -*- mode: js; js-indent-level: 2; indent-tabs-mode: nil -*-
///////////////////////// Component-global "Constants" /////////////////////////
var DESCRIPTION = "UW_GreasemonkeyService";
var CONTRACTID = "@unity_webapps.mozdev.org/unity_webapps-service;1";
var CLASSID = Components.ID("{2a0b5340-2714-11e1-bfc2-0800200c9a66}");
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/ctypes.jsm");
function UnityWebapps() {
try {
this.lib = ctypes.open("libunity-webapps.so.0");
} catch (e) {
try {
this.lib = ctypes.open("/usr/local/lib/libunity-webapps.so.0");
} catch (e) {
this.lib = ctypes.open("/usr/lib/libunity-webapps.so.0");
}
}
this.permissions_get_domain_dontask =
this.lib.declare("unity_webapps_permissions_get_domain_dontask",
ctypes.default_abi,
ctypes.int32_t,ctypes.char.ptr);
this.permissions_dontask_domain =
this.lib.declare("unity_webapps_permissions_dontask_domain",
ctypes.default_abi,
ctypes.void_t,ctypes.char.ptr);
this.permissions_is_integration_allowed =
this.lib.declare("unity_webapps_permissions_is_integration_allowed",
ctypes.default_abi,
ctypes.int32_t);
this.permissions_allow_domain =
this.lib.declare("unity_webapps_permissions_allow_domain",
ctypes.default_abi,
ctypes.void_t,
ctypes.char.ptr);
}
function UnityWebappsRepository() {
try {
this.lib = ctypes.open("libunity-webapps-repository.so.0");
} catch (e) {
try {
this.lib = ctypes.open("/usr/local/lib/libunity-webapps-repository.so.0");
} catch (e) {
this.lib = ctypes.open("libunity-webapps-repository.so.0");
}
}
this.ApplicationRepositoryInstallCallbackType =
ctypes.FunctionType(ctypes.default_abi, ctypes.void_t, [ctypes.voidptr_t, ctypes.char.ptr, ctypes.int32_t, ctypes.voidptr_t,]);
this.application_repository_new_default =
this.lib.declare("unity_webapps_application_repository_new_default",
ctypes.default_abi, ctypes.voidptr_t);
this.application_repository_get_resolved_application_status =
this.lib.declare("unity_webapps_application_repository_get_resolved_application_status",
ctypes.default_abi, ctypes.int32_t, ctypes.voidptr_t, ctypes.char.ptr);
this.application_repository_get_resolved_application_name =
this.lib.declare("unity_webapps_application_repository_get_resolved_application_name",
ctypes.default_abi, ctypes.char.ptr, ctypes.voidptr_t, ctypes.char.ptr);
this.application_repository_get_resolved_application_domain =
this.lib.declare("unity_webapps_application_repository_get_resolved_application_domain",
ctypes.default_abi, ctypes.char.ptr, ctypes.voidptr_t, ctypes.char.ptr);
this.application_repository_get_userscript_contents =
this.lib.declare("unity_webapps_application_repository_get_userscript_contents",
ctypes.default_abi, ctypes.char.ptr, ctypes.voidptr_t, ctypes.char.ptr);
this.application_repository_install_application =
this.lib.declare("unity_webapps_application_repository_install_application",
ctypes.default_abi, ctypes.void_t, ctypes.voidptr_t, ctypes.char.ptr, this.ApplicationRepositoryInstallCallbackType.ptr, ctypes.voidptr_t);
this.application_repository_prepare =
this.lib.declare("unity_webapps_application_repository_prepare",
ctypes.default_abi, ctypes.int32_t, ctypes.voidptr_t);
this.application_repository_resolve_url_as_json =
this.lib.declare("unity_webapps_application_repository_resolve_url_as_json",
ctypes.default_abi, ctypes.char.ptr, ctypes.voidptr_t, ctypes.char.ptr);
var glib = ctypes.open("libglib-2.0.so.0");
this.g_free = glib.declare("g_free",
ctypes.default_abi,
ctypes.void_t, ctypes.voidptr_t);
this.APPLICATION_STATUS_INSTALLED = 1;
this.APPLICATION_STATUS_AVAILABLE = 0;
}
function getScriptSource(uwr, repo, name) {
var ptr = uwr.application_repository_get_userscript_contents(repo, name);
var src = ptr.readString();
uwr.g_free(ptr);
return src;
}
// \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ //
function UW_ScriptLogger(scriptName) {
var namespace = 'uw/';
this.prefix = [namespace, scriptName, ": "].join("");
}
UW_ScriptLogger.prototype.consoleService = Components
.classes["@mozilla.org/consoleservice;1"]
.getService(Components.interfaces.nsIConsoleService);
UW_ScriptLogger.prototype.log = function(message) {
this.consoleService.logStringMessage(this.prefix + '\n' + message);
};
// \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ //
function UW_console(scriptName) {
// based on http://www.getfirebug.com/firebug/firebugx.js
var names = [
"debug", "warn", "error", "info", "assert", "dir", "dirxml",
"group", "groupEnd", "time", "timeEnd", "count", "trace", "profile",
"profileEnd"
];
for (var i=0, name; name=names[i]; i++) {
this[name] = function() {};
}
// Important to use this private variable so that user scripts can't make
// this call something else by redefining or .
var logger = new UW_ScriptLogger(scriptName);
this.log = function() {
logger.log(
Array.prototype.slice.apply(arguments).join("\n")
);
};
}
UW_console.prototype.log = function() {
};
// \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ //
var gmRunScriptFilename = "resource://unity_webapps/runScript.js";
var gExtensionPath = (function() {
try {
// Turn the file:/// URL into an nsIFile ...
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
var uri = ioService.newURI(Components.stack.filename, null, null);
var file = uri.QueryInterface(Components.interfaces.nsIFileURL).file;
// ... to find the containing directory.
var dir = file.parent.parent;
// Then get the URL back for that path.
return ioService.newFileURI(dir).spec;
} catch (e) { dump(e+'\n'+uneval(e)+'\n\n'); return 'x'; }
})();
// Only a particular set of strings are allowed. See: http://goo.gl/ex2LJ
var gMaxJSVersion = "ECMAv5";
var gMenuCommands = [];
var gStartupHasRun = false;
var gFileProtocolHandler = Components
.classes["@mozilla.org/network/protocol;1?name=file"]
.getService(Ci.nsIFileProtocolHandler);
var gTmpDir = Components.classes["@mozilla.org/file/directory_service;1"]
.getService(Components.interfaces.nsIProperties)
.get("TmpD", Components.interfaces.nsILocalFile);
// Examines the stack to determine if an API should be callable.
function UW_apiLeakCheck(apiName) {
var stack = Components.stack;
do {
// Valid locations for GM API calls are:
// * Greasemonkey modules.
// * All of chrome. (In the script update case, chrome will list values.)
// * Greasemonkey extension by path. (FF 3 does this instead of the above.)
// Anything else on the stack and we will reject the API, to make sure that
// the content window (whose path would be e.g. http://...) has no access.
if (2 == stack.language
&& stack.filename.substr(0, 24) !== 'resource://unity_webapps/'
&& stack.filename.substr(0, 9) !== 'chrome://'
&& stack.filename.substr(0, gExtensionPath.length) !== gExtensionPath
) {
UW_util.logError(new Error("Greasemonkey access violation: " +
"unsafeWindow cannot call " + apiName + "."));
return false;
}
stack = stack.caller;
} while (stack);
return true;
}
function createSandbox(aScriptName, aContentWin, aChromeWin, aFirebugConsole, aUrl
) {
var unsafeWin = aContentWin.wrappedJSObject;
var sandbox = new Components.utils.Sandbox(aContentWin, {sandboxPrototype: aContentWin});
sandbox.unsafeWindow = unsafeWin;
sandbox.XPathResult = Ci.nsIDOMXPathResult;
sandbox.console = aFirebugConsole ? aFirebugConsole : new UW_console(aScriptName);
sandbox.external = unsafeWin.external;
return sandbox;
}
function findError(script, lineNumber) {
var start = 0;
var end = 1;
for (var i = 0; i < script.offsets.length; i++) {
end = script.offsets[i];
if (lineNumber <= end) {
return {
uri: script.requires[i].fileURL,
lineNumber: (lineNumber - start)
};
}
start = end;
}
return {
uri: script.fileURL,
lineNumber: (lineNumber - end)
};
}
function getFirebugConsole(wrappedContentWin, chromeWin) {
try {
return chromeWin.Firebug
&& chromeWin.Firebug.getConsoleByGlobal(wrappedContentWin)
|| null;
} catch (e) {
dump('Greasemonkey: Failure Firebug console:\n' + uneval(e) + '\n');
return null;
}
}
function isTempScript(uri) {
if (uri.scheme != "file") return false;
var file = gFileProtocolHandler.getFileFromURLSpec(uri.spec);
return gTmpDir.contains(file, true);
}
function runScriptInSandbox(code, sandbox) {
try {
UW_runScript(code, sandbox, gMaxJSVersion);
} catch (e) { // catches errors while running the script code
try {
if (e && "return not in function" == e.message) {
// Means this script depends on the function enclosure.
return false;
}
// Most errors seem to have a ".fileName", but rarely they're in
// ".filename" instead.
var fileName = e.fileName || e.filename;
if (fileName == gmRunScriptFilename) {
/* TODO: port this
var err = findError(script, e.lineNumber);
UW_util.logError(
e, // error obj
0, // 0 = error (1 = warning)
err.uri, err.lineNumber);*/
UW_util.logError(e);
} else {
UW_util.logError(e);
}
} catch (e) {
// Do not raise (this would stop all scripts), log.
UW_util.logError(e);
}
}
return true; // did not need a (function() {...})() enclosure.
}
function startup() {
if (gStartupHasRun) return;
gStartupHasRun = true;
Cu.import(gmRunScriptFilename);
Cu.import("resource://unity_webapps/utils.js"); // At top = fail in FF3.
var loader = Cc["@mozilla.org/moz/jssubscript-loader;1"]
.getService(Ci.mozIJSSubScriptLoader);
loader.loadSubScript("chrome://global/content/XPCNativeWrapper.js");
}
function suggestAppInstall(uw, uwr, repo, chromeWindow, contentWindow, appId, url) {
let appDomain = uwr.application_repository_get_resolved_application_domain (repo, appId);
if (!appDomain.isNull() && uw.permissions_get_domain_dontask(appDomain.readString()))
return;
if (repo.install_request_stamps[appId] !== undefined) {
return;
}
repo.install_request_stamps[appId] = true;
try {
Cu.import("resource://unity/l10n.js");
let appName = uwr.application_repository_get_resolved_application_name (repo, appId);
var promptMsg = l10n.formatMessage('webappsGreasemonkey.installPrompt', [appName.readString()]);
var dontaskMsg = l10n.formatMessage('prompt.dontask');
var installMsg = l10n.formatMessage('webappsGreasemonkey.install');
Cu.unload("resource://unity/l10n.js");
} catch (x) {return;}
function onInstall(_repo, name, status, data) {
delete repo.saved_install_callbacks[appId];
if (status == uwr.APPLICATION_STATUS_INSTALLED) {
if (!appDomain.isNull()) {
uw.permissions_allow_domain (appDomain.readString());
}
var scripts = [];
var src = getScriptSource(uwr, repo, name);
scripts.push({ name: name, content: src });
UW_util.getService().injectScripts(scripts, url, contentWindow, chromeWindow);
}
}
onInstall = uwr.ApplicationRepositoryInstallCallbackType.ptr(onInstall);
function installApp() {
if (repo.saved_install_callbacks[appId] === undefined) {
repo.saved_install_callbacks[appId] = onInstall;
uwr.application_repository_install_application(repo, appId, onInstall, null);
}
}
function addToIgnoreList() {
if (!appDomain.isNull()) {
uw.permissions_dontask_domain(appDomain.readString());
}
}
chromeWindow.PopupNotifications.show(chromeWindow.gBrowser.getBrowserForDocument(contentWindow.document),
"unity-permission-popup",
promptMsg,
null,
{
label: installMsg,
accessKey: "I",
callback: installApp
},
[
{
label: dontaskMsg,
accessKey: "D",
callback: addToIgnoreList
}
]);
}
/////////////////////////////////// Service ////////////////////////////////////
function service() {
this.wrappedJSObject = this;
// A bit of a hack
// We need to ensure the storage subsystem is initialized before we
// use sqlite from libunity-webapps-repository.so otherwise
// sqlite3_config may fail in firefox.
// https://bugs.launchpad.net/ubuntu/quantal/+source/webapps-greasemonkey/+bug/1058209
// Would be nice to remove as it has an impact on startup time.
let sadness = Services.storage;
this._uw = new UnityWebapps();
this._uwr = new UnityWebappsRepository();
this._repo = this._uwr.application_repository_new_default();
this._repo.saved_install_callbacks = {};
this._repo.install_request_stamps = {};
this._uwr.application_repository_prepare(this._repo);
}
////////////////////////////////// Constants ///////////////////////////////////
service.prototype.classDescription = DESCRIPTION;
service.prototype.classID = CLASSID;
service.prototype.contractID = CONTRACTID;
service.prototype._xpcom_categories = [{
category: "app-startup",
entry: DESCRIPTION,
value: CONTRACTID,
service: true
},{
category: "content-policy",
entry: CONTRACTID,
value: CONTRACTID,
service: true
}];
service.prototype.QueryInterface = XPCOMUtils.generateQI([
Ci.nsIObserver,
Ci.nsISupports,
Ci.nsISupportsWeakReference,
Ci.uwIGreasemonkeyService,
Ci.nsIWindowMediatorListener,
]);
///////////////////////////////// nsIObserver //////////////////////////////////
service.prototype.observe = function(aSubject, aTopic, aData) {
switch (aTopic) {
case 'app-startup':
case 'profile-after-change':
startup();
break;
}
};
//////////////////////////// uwIGreasemonkeyService ////////////////////////////
service.prototype.contentDestroyed = function(contentWindowId) {
if (!contentWindowId) return;
this.withAllMenuCommandsForWindowId(null, function(index, command) {
var closed = false;
try { closed = command.contentWindow.closed; } catch (e) { }
if (closed || (command.contentWindowId == contentWindowId)) {
gMenuCommands.splice(index, 1);
}
}, true);
};
service.prototype.contentFrozen = function(contentWindowId) {
if (!contentWindowId) return;
this.withAllMenuCommandsForWindowId(contentWindowId,
function(index, command) { command.frozen = true; });
};
service.prototype.contentThawed = function(contentWindowId) {
if (!contentWindowId) return;
this.withAllMenuCommandsForWindowId(contentWindowId,
function(index, command) { command.frozen = false; });
};
service.prototype.runScripts = function(aRunWhen, aWrappedContentWin, aChromeWin) {
if (!this._uw.permissions_is_integration_allowed())
return;
var url = aWrappedContentWin.document.location.href;
if (!UW_util.isGreasemonkeyable(url)) return;
if (aWrappedContentWin.parent !== aWrappedContentWin) {
return;
}
var scripts = [];
var names = this._uwr.application_repository_resolve_url_as_json(this._repo, url);
if (!names.isNull()) {
let tmp = names.readString();
this._uwr.g_free(names);
names = tmp;
} else {
names = null;
}
if (names) {
names = JSON.parse(names);
for (var idx = 0; idx < names.length; ++idx) {
var name = names[idx];
let appDomain = this._uwr.application_repository_get_resolved_application_domain (this._repo, name);
if (!appDomain.isNull() && this._uw.permissions_get_domain_dontask(appDomain.readString()))
continue;
switch (this._uwr.application_repository_get_resolved_application_status(this._repo, name)) {
case this._uwr.APPLICATION_STATUS_AVAILABLE:
suggestAppInstall(this._uw, this._uwr, this._repo, aChromeWin, aWrappedContentWin, name, url);
break;
case this._uwr.APPLICATION_STATUS_INSTALLED:
var src = getScriptSource(this._uwr, this._repo, name);
scripts.push({ name: name, content: src });
break;
}
}
}
if (scripts.length > 0) {
this.injectScripts(scripts, url, aWrappedContentWin, aChromeWin);
}
};
service.prototype.ignoreNextScript = function() {
this._ignoreNextScript = true;
};
service.prototype.injectScripts = function(
scripts, url, wrappedContentWin, chromeWin
) {
var firebugConsole = getFirebugConsole(wrappedContentWin, chromeWin);
for (var i = 0, script = null; script = scripts[i]; i++) {
var sandbox = createSandbox(script.name, wrappedContentWin, chromeWin, firebugConsole, url);
// These newlines are critical for error line calculation. The last handles
// a script whose final line is a line comment, to not break the wrapper
// function.
runScriptInSandbox(script.content, sandbox);
}
};
service.prototype.withAllMenuCommandsForWindowId = function(
aContentWindowId, aCallback, aForce
) {
if(!aContentWindowId && !aForce) return;
var l = gMenuCommands.length - 1;
for (var i = l, command = null; command = gMenuCommands[i]; i--) {
if (aForce
|| (command.contentWindowId == aContentWindowId)
) {
aCallback(i, command);
}
}
};
var NSGetFactory = XPCOMUtils.generateNSGetFactory([service]);
webapps-greasemonkey-2.3.6+13.10.20130920.1/components/uwIGreasemonkeyService.xpt 0000644 0000157 0000170 00000000243 12217153363 027724 0 ustar pbuser pbgroup 0000000 0000000 XPCOM
TypeLib
$ \ ;z '" f
/ nsISupports uwIGreasemonkeyService runScripts $ webapps-greasemonkey-2.3.6+13.10.20130920.1/publicsuffix.sh 0000644 0000157 0000170 00000001461 12217153363 023405 0 ustar pbuser pbgroup 0000000 0000000 #!/bin/sh
# This script downloads the list from publicsuffix.org and uses it to regenerate
# the ".tld" feature's regular expression.
# See: https://github.com/greasemonkey/greasemonkey/issues/1351
#
# To date, this script is only expected to be comatible with GNU toolchains.
set -e
URL="https://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat?raw=1"
# Create the mega list of TLDs as a regular expression.
TLDS=`curl -s "$URL" | \
egrep -v '^$|^//|^!' | \
sort | \
sed -e 's/\s.*//' -e 's/\./\\./' -e 's/^\*/[^.]+/' | \
tr '\n' '|' | \
sed -e 's/|$//'`
# Remove the last line, where this data lives.
sed -i -e '$d' modules/third-party/convert2RegExp.js
# Replace it with the new data.
echo "var tldStr = \"\\.(?:$TLDS)\";" >> modules/third-party/convert2RegExp.js
webapps-greasemonkey-2.3.6+13.10.20130920.1/LICENSE.mit 0000644 0000157 0000170 00000002460 12217153363 022143 0 ustar pbuser pbgroup 0000000 0000000 === START LICENSE ===
Copyright 2004-2007 Aaron Boodman
Contributors: See contributors list in install.rdf
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Note that this license applies only to the Greasemonkey extension source
files, not to the user scripts which it runs. User scripts are licensed
separately by their authors.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
=== END LICENSE ===
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
webapps-greasemonkey-2.3.6+13.10.20130920.1/build.sh 0000755 0000157 0000170 00000002636 12217153363 022011 0 ustar pbuser pbgroup 0000000 0000000 #!/bin/sh
# Set up variables
if [ "official" = "$1" ]; then
# For official builds, use the version in install.rdf.
GMVER=`sed -ne '/em:version/{ s/.*>\(.*\)<.*/\1/; p}' install.rdf`
else
# For beta builds, generate a version number.
BUILDTYPE="${1:-beta}"
GMVER=`date +"%Y.%m.%d.$BUILDTYPE"`
fi
GMXPI="webapps-$GMVER.xpi"
# Copy base structure to a temporary build directory and change to it
echo "Creating working directory ..."
rm -rf build
mkdir build
cp -r \
chrome.manifest components content defaults install.rdf \
modules CREDITS LICENSE.bsd LICENSE.mit LICENSE.mpl \
build/
cd build
echo "Cleaning up unwanted files ..."
find . -depth -name '*~' -exec rm -rf "{}" \;
find . -depth -name '#*' -exec rm -rf "{}" \;
find . -depth -name '*.psd' -exec rm -rf "{}" \;
if [ "official" != "$1" ]; then
echo "Patching install.rdf version ..."
sed -e "s/.*<\/em:version>/$GMVER<\/em:version>/" \
install.rdf > tmp
cat tmp > install.rdf
rm tmp
fi
echo "Creating unity_webapps.jar ..."
sed \
-e "s/^content *\([^ ]*\) *\([^ ]*\)/content \1 jar:chrome\/unity_webapps.jar!\/\2/" \
chrome.manifest > tmp
cat tmp > chrome.manifest
rm tmp
find content | sort | \
zip -qr0D@ "unity_webapps.jar"
rm -fr content/
mkdir chrome
mv unity_webapps.jar chrome/
echo "Creating $GMXPI ..."
zip -qr9DX "../$GMXPI" *
echo "Cleaning up temporary files ..."
cd ..
rm -rf build
webapps-greasemonkey-2.3.6+13.10.20130920.1/install.rdf 0000644 0000157 0000170 00000004642 12217153363 022515 0 ustar pbuser pbgroup 0000000 0000000
{2e1445b0-2682-11e1-bfc2-0800200c9a66}
2.3.6
Canonical Ltd.
2
true
Unity Websites integration
Aaron Boodman; http://youngpup.net/
Anthony Lieuallen; http://arantius.com/
Chris Feldmann; http://axlotl.net/
David Schontzler; http://stilleye.com/
Erik Vold; http://erikvold.com/
Gareth Andrew; http://freegarethandrew.org/
Hisateru Tanaka
Jeremy Dunck; http://dunck.us/anabasis/
Jesper Kristensen; <mail@jesperkristensen.dk>
Johan Sundström; http://ecmanaut.blogspot.com/
JP Sugarbroad
Juan Pablo Guereca Alonso
Manpreet Singh
Mark Pilgrim; http://diveintomark.org/
Marti Martz
Matthew Gray; http://mkgray.com:8000/
Matthias Bauer; http://moeffju.net/
Mike Medley; http://sizzlemctwizzle.com/
Nikolas Coukouma; http://atrus.org/
Ori Avtallon
Pak Kei (logo); http://arkidect.com/
Sam Larison; http://samlarison.com/
Sergio Abreu; http://sitedosergio.sitesbr.net/
Tommi Rautava
{ec8030f7-c20a-464f-9b0e-13a3a9e97384}
9.0
17.*
18.*
webapps-greasemonkey-2.3.6+13.10.20130920.1/chrome.manifest 0000644 0000157 0000170 00000001013 12217153363 023344 0 ustar pbuser pbgroup 0000000 0000000 interfaces components/uwIGreasemonkeyService.xpt
component {2a0b5340-2714-11e1-bfc2-0800200c9a66} components/unity_webapps.js
contract @unity_webapps.mozdev.org/unity_webapps-service;1 {2a0b5340-2714-11e1-bfc2-0800200c9a66}
category profile-after-change @unity_webapps.mozdev.org/unity_webapps-service;1 @unity_webapps.mozdev.org/unity_webapps-service;1
content unity_webapps content/
overlay chrome://browser/content/browser.xul chrome://unity_webapps/content/browser.xul
resource unity_webapps modules/
webapps-greasemonkey-2.3.6+13.10.20130920.1/LICENSE.mpl 0000644 0000157 0000170 00000062232 12217153363 022145 0 ustar pbuser pbgroup 0000000 0000000 MOZILLA PUBLIC LICENSE
Version 1.1
---------------
1. Definitions.
1.0.1. "Commercial Use" means distribution or otherwise making the
Covered Code available to a third party.
1.1. "Contributor" means each entity that creates or contributes to
the creation of Modifications.
1.2. "Contributor Version" means the combination of the Original
Code, prior Modifications used by a Contributor, and the Modifications
made by that particular Contributor.
1.3. "Covered Code" means the Original Code or Modifications or the
combination of the Original Code and Modifications, in each case
including portions thereof.
1.4. "Electronic Distribution Mechanism" means a mechanism generally
accepted in the software development community for the electronic
transfer of data.
1.5. "Executable" means Covered Code in any form other than Source
Code.
1.6. "Initial Developer" means the individual or entity identified
as the Initial Developer in the Source Code notice required by Exhibit
A.
1.7. "Larger Work" means a work which combines Covered Code or
portions thereof with code not governed by the terms of this License.
1.8. "License" means this document.
1.8.1. "Licensable" means having the right to grant, to the maximum
extent possible, whether at the time of the initial grant or
subsequently acquired, any and all of the rights conveyed herein.
1.9. "Modifications" means any addition to or deletion from the
substance or structure of either the Original Code or any previous
Modifications. When Covered Code is released as a series of files, a
Modification is:
A. Any addition to or deletion from the contents of a file
containing Original Code or previous Modifications.
B. Any new file that contains any part of the Original Code or
previous Modifications.
1.10. "Original Code" means Source Code of computer software code
which is described in the Source Code notice required by Exhibit A as
Original Code, and which, at the time of its release under this
License is not already Covered Code governed by this License.
1.10.1. "Patent Claims" means any patent claim(s), now owned or
hereafter acquired, including without limitation, method, process,
and apparatus claims, in any patent Licensable by grantor.
1.11. "Source Code" means the preferred form of the Covered Code for
making modifications to it, including all modules it contains, plus
any associated interface definition files, scripts used to control
compilation and installation of an Executable, or source code
differential comparisons against either the Original Code or another
well known, available Covered Code of the Contributor's choice. The
Source Code can be in a compressed or archival form, provided the
appropriate decompression or de-archiving software is widely available
for no charge.
1.12. "You" (or "Your") means an individual or a legal entity
exercising rights under, and complying with all of the terms of, this
License or a future version of this License issued under Section 6.1.
For legal entities, "You" includes any entity which controls, is
controlled by, or is under common control with You. For purposes of
this definition, "control" means (a) the power, direct or indirect,
to cause the direction or management of such entity, whether by
contract or otherwise, or (b) ownership of more than fifty percent
(50%) of the outstanding shares or beneficial ownership of such
entity.
2. Source Code License.
2.1. The Initial Developer Grant.
The Initial Developer hereby grants You a world-wide, royalty-free,
non-exclusive license, subject to third party intellectual property
claims:
(a) under intellectual property rights (other than patent or
trademark) Licensable by Initial Developer to use, reproduce,
modify, display, perform, sublicense and distribute the Original
Code (or portions thereof) with or without Modifications, and/or
as part of a Larger Work; and
(b) under Patents Claims infringed by the making, using or
selling of Original Code, to make, have made, use, practice,
sell, and offer for sale, and/or otherwise dispose of the
Original Code (or portions thereof).
(c) the licenses granted in this Section 2.1(a) and (b) are
effective on the date Initial Developer first distributes
Original Code under the terms of this License.
(d) Notwithstanding Section 2.1(b) above, no patent license is
granted: 1) for code that You delete from the Original Code; 2)
separate from the Original Code; or 3) for infringements caused
by: i) the modification of the Original Code or ii) the
combination of the Original Code with other software or devices.
2.2. Contributor Grant.
Subject to third party intellectual property claims, each Contributor
hereby grants You a world-wide, royalty-free, non-exclusive license
(a) under intellectual property rights (other than patent or
trademark) Licensable by Contributor, to use, reproduce, modify,
display, perform, sublicense and distribute the Modifications
created by such Contributor (or portions thereof) either on an
unmodified basis, with other Modifications, as Covered Code
and/or as part of a Larger Work; and
(b) under Patent Claims infringed by the making, using, or
selling of Modifications made by that Contributor either alone
and/or in combination with its Contributor Version (or portions
of such combination), to make, use, sell, offer for sale, have
made, and/or otherwise dispose of: 1) Modifications made by that
Contributor (or portions thereof); and 2) the combination of
Modifications made by that Contributor with its Contributor
Version (or portions of such combination).
(c) the licenses granted in Sections 2.2(a) and 2.2(b) are
effective on the date Contributor first makes Commercial Use of
the Covered Code.
(d) Notwithstanding Section 2.2(b) above, no patent license is
granted: 1) for any code that Contributor has deleted from the
Contributor Version; 2) separate from the Contributor Version;
3) for infringements caused by: i) third party modifications of
Contributor Version or ii) the combination of Modifications made
by that Contributor with other software (except as part of the
Contributor Version) or other devices; or 4) under Patent Claims
infringed by Covered Code in the absence of Modifications made by
that Contributor.
3. Distribution Obligations.
3.1. Application of License.
The Modifications which You create or to which You contribute are
governed by the terms of this License, including without limitation
Section 2.2. The Source Code version of Covered Code may be
distributed only under the terms of this License or a future version
of this License released under Section 6.1, and You must include a
copy of this License with every copy of the Source Code You
distribute. You may not offer or impose any terms on any Source Code
version that alters or restricts the applicable version of this
License or the recipients' rights hereunder. However, You may include
an additional document offering the additional rights described in
Section 3.5.
3.2. Availability of Source Code.
Any Modification which You create or to which You contribute must be
made available in Source Code form under the terms of this License
either on the same media as an Executable version or via an accepted
Electronic Distribution Mechanism to anyone to whom you made an
Executable version available; and if made available via Electronic
Distribution Mechanism, must remain available for at least twelve (12)
months after the date it initially became available, or at least six
(6) months after a subsequent version of that particular Modification
has been made available to such recipients. You are responsible for
ensuring that the Source Code version remains available even if the
Electronic Distribution Mechanism is maintained by a third party.
3.3. Description of Modifications.
You must cause all Covered Code to which You contribute to contain a
file documenting the changes You made to create that Covered Code and
the date of any change. You must include a prominent statement that
the Modification is derived, directly or indirectly, from Original
Code provided by the Initial Developer and including the name of the
Initial Developer in (a) the Source Code, and (b) in any notice in an
Executable version or related documentation in which You describe the
origin or ownership of the Covered Code.
3.4. Intellectual Property Matters
(a) Third Party Claims.
If Contributor has knowledge that a license under a third party's
intellectual property rights is required to exercise the rights
granted by such Contributor under Sections 2.1 or 2.2,
Contributor must include a text file with the Source Code
distribution titled "LEGAL" which describes the claim and the
party making the claim in sufficient detail that a recipient will
know whom to contact. If Contributor obtains such knowledge after
the Modification is made available as described in Section 3.2,
Contributor shall promptly modify the LEGAL file in all copies
Contributor makes available thereafter and shall take other steps
(such as notifying appropriate mailing lists or newsgroups)
reasonably calculated to inform those who received the Covered
Code that new knowledge has been obtained.
(b) Contributor APIs.
If Contributor's Modifications include an application programming
interface and Contributor has knowledge of patent licenses which
are reasonably necessary to implement that API, Contributor must
also include this information in the LEGAL file.
(c) Representations.
Contributor represents that, except as disclosed pursuant to
Section 3.4(a) above, Contributor believes that Contributor's
Modifications are Contributor's original creation(s) and/or
Contributor has sufficient rights to grant the rights conveyed by
this License.
3.5. Required Notices.
You must duplicate the notice in Exhibit A in each file of the Source
Code. If it is not possible to put such notice in a particular Source
Code file due to its structure, then You must include such notice in a
location (such as a relevant directory) where a user would be likely
to look for such a notice. If You created one or more Modification(s)
You may add your name as a Contributor to the notice described in
Exhibit A. You must also duplicate this License in any documentation
for the Source Code where You describe recipients' rights or ownership
rights relating to Covered Code. You may choose to offer, and to
charge a fee for, warranty, support, indemnity or liability
obligations to one or more recipients of Covered Code. However, You
may do so only on Your own behalf, and not on behalf of the Initial
Developer or any Contributor. You must make it absolutely clear than
any such warranty, support, indemnity or liability obligation is
offered by You alone, and You hereby agree to indemnify the Initial
Developer and every Contributor for any liability incurred by the
Initial Developer or such Contributor as a result of warranty,
support, indemnity or liability terms You offer.
3.6. Distribution of Executable Versions.
You may distribute Covered Code in Executable form only if the
requirements of Section 3.1-3.5 have been met for that Covered Code,
and if You include a notice stating that the Source Code version of
the Covered Code is available under the terms of this License,
including a description of how and where You have fulfilled the
obligations of Section 3.2. The notice must be conspicuously included
in any notice in an Executable version, related documentation or
collateral in which You describe recipients' rights relating to the
Covered Code. You may distribute the Executable version of Covered
Code or ownership rights under a license of Your choice, which may
contain terms different from this License, provided that You are in
compliance with the terms of this License and that the license for the
Executable version does not attempt to limit or alter the recipient's
rights in the Source Code version from the rights set forth in this
License. If You distribute the Executable version under a different
license You must make it absolutely clear that any terms which differ
from this License are offered by You alone, not by the Initial
Developer or any Contributor. You hereby agree to indemnify the
Initial Developer and every Contributor for any liability incurred by
the Initial Developer or such Contributor as a result of any such
terms You offer.
3.7. Larger Works.
You may create a Larger Work by combining Covered Code with other code
not governed by the terms of this License and distribute the Larger
Work as a single product. In such a case, You must make sure the
requirements of this License are fulfilled for the Covered Code.
4. Inability to Comply Due to Statute or Regulation.
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Code due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description
must be included in the LEGAL file described in Section 3.4 and must
be included with all distributions of the Source Code. Except to the
extent prohibited by statute or regulation, such description must be
sufficiently detailed for a recipient of ordinary skill to be able to
understand it.
5. Application of this License.
This License applies to code to which the Initial Developer has
attached the notice in Exhibit A and to related Covered Code.
6. Versions of the License.
6.1. New Versions.
Netscape Communications Corporation ("Netscape") may publish revised
and/or new versions of the License from time to time. Each version
will be given a distinguishing version number.
6.2. Effect of New Versions.
Once Covered Code has been published under a particular version of the
License, You may always continue to use it under the terms of that
version. You may also choose to use such Covered Code under the terms
of any subsequent version of the License published by Netscape. No one
other than Netscape has the right to modify the terms applicable to
Covered Code created under this License.
6.3. Derivative Works.
If You create or use a modified version of this License (which you may
only do in order to apply it to code which is not already Covered Code
governed by this License), You must (a) rename Your license so that
the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
"MPL", "NPL" or any confusingly similar phrase do not appear in your
license (except to note that your license differs from this License)
and (b) otherwise make it clear that Your version of the license
contains terms which differ from the Mozilla Public License and
Netscape Public License. (Filling in the name of the Initial
Developer, Original Code or Contributor in the notice described in
Exhibit A shall not of themselves be deemed to be modifications of
this License.)
7. DISCLAIMER OF WARRANTY.
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
8. TERMINATION.
8.1. This License and the rights granted hereunder will terminate
automatically if You fail to comply with terms herein and fail to cure
such breach within 30 days of becoming aware of the breach. All
sublicenses to the Covered Code which are properly granted shall
survive any termination of this License. Provisions which, by their
nature, must remain in effect beyond the termination of this License
shall survive.
8.2. If You initiate litigation by asserting a patent infringement
claim (excluding declatory judgment actions) against Initial Developer
or a Contributor (the Initial Developer or Contributor against whom
You file such action is referred to as "Participant") alleging that:
(a) such Participant's Contributor Version directly or indirectly
infringes any patent, then any and all rights granted by such
Participant to You under Sections 2.1 and/or 2.2 of this License
shall, upon 60 days notice from Participant terminate prospectively,
unless if within 60 days after receipt of notice You either: (i)
agree in writing to pay Participant a mutually agreeable reasonable
royalty for Your past and future use of Modifications made by such
Participant, or (ii) withdraw Your litigation claim with respect to
the Contributor Version against such Participant. If within 60 days
of notice, a reasonable royalty and payment arrangement are not
mutually agreed upon in writing by the parties or the litigation claim
is not withdrawn, the rights granted by Participant to You under
Sections 2.1 and/or 2.2 automatically terminate at the expiration of
the 60 day notice period specified above.
(b) any software, hardware, or device, other than such Participant's
Contributor Version, directly or indirectly infringes any patent, then
any rights granted to You by such Participant under Sections 2.1(b)
and 2.2(b) are revoked effective as of the date You first made, used,
sold, distributed, or had made, Modifications made by that
Participant.
8.3. If You assert a patent infringement claim against Participant
alleging that such Participant's Contributor Version directly or
indirectly infringes any patent where such claim is resolved (such as
by license or settlement) prior to the initiation of patent
infringement litigation, then the reasonable value of the licenses
granted by such Participant under Sections 2.1 or 2.2 shall be taken
into account in determining the amount or value of any payment or
license.
8.4. In the event of termination under Sections 8.1 or 8.2 above,
all end user license agreements (excluding distributors and resellers)
which have been validly granted by You or any distributor hereunder
prior to termination shall survive termination.
9. LIMITATION OF LIABILITY.
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
10. U.S. GOVERNMENT END USERS.
The Covered Code is a "commercial item," as that term is defined in
48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
software" and "commercial computer software documentation," as such
terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
all U.S. Government End Users acquire Covered Code with only those
rights set forth herein.
11. MISCELLANEOUS.
This License represents the complete agreement concerning subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. This License shall be governed by
California law provisions (except to the extent applicable law, if
any, provides otherwise), excluding its conflict-of-law provisions.
With respect to disputes in which at least one party is a citizen of,
or an entity chartered or registered to do business in the United
States of America, any litigation relating to this License shall be
subject to the jurisdiction of the Federal Courts of the Northern
District of California, with venue lying in Santa Clara County,
California, with the losing party responsible for costs, including
without limitation, court costs and reasonable attorneys' fees and
expenses. The application of the United Nations Convention on
Contracts for the International Sale of Goods is expressly excluded.
Any law or regulation which provides that the language of a contract
shall be construed against the drafter shall not apply to this
License.
12. RESPONSIBILITY FOR CLAIMS.
As between Initial Developer and the Contributors, each party is
responsible for claims and damages arising, directly or indirectly,
out of its utilization of rights under this License and You agree to
work with Initial Developer and Contributors to distribute such
responsibility on an equitable basis. Nothing herein is intended or
shall be deemed to constitute any admission of liability.
13. MULTIPLE-LICENSED CODE.
Initial Developer may designate portions of the Covered Code as
"Multiple-Licensed". "Multiple-Licensed" means that the Initial
Developer permits you to utilize portions of the Covered Code under
Your choice of the NPL or the alternative licenses, if any, specified
by the Initial Developer in the file described in Exhibit A.
EXHIBIT A -Mozilla Public License.
``The contents of this file are subject to the Mozilla Public License
Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.
The Original Code is ______________________________________.
The Initial Developer of the Original Code is ________________________.
Portions created by ______________________ are Copyright (C) ______
_______________________. All Rights Reserved.
Contributor(s): ______________________________________.
Alternatively, the contents of this file may be used under the terms
of the _____ license (the "[___] License"), in which case the
provisions of [______] License are applicable instead of those
above. If you wish to allow use of your version of this file only
under the terms of the [____] License and not to allow others to use
your version of this file under the MPL, indicate your decision by
deleting the provisions above and replace them with the notice and
other provisions required by the [___] License. If you do not delete
the provisions above, a recipient may use your version of this file
under either the MPL or the [___] License."
[NOTE: The text of this Exhibit A may differ slightly from the text of
the notices in the Source Code files of the Original Code. You should
use the text of this Exhibit A rather than the text found in the
Original Code Source Code for Your Modifications.]
webapps-greasemonkey-2.3.6+13.10.20130920.1/LICENSE.bsd 0000644 0000157 0000170 00000003011 12217153363 022113 0 ustar pbuser pbgroup 0000000 0000000 Software License Agreement (BSD License)
Copyright (c) ,
All rights reserved.
Redistribution and use of this software in source and binary forms, with or
without modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above
copyright notice, this list of conditions and the
following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other
materials provided with the distribution.
* Neither the name of nor the names of its
contributors may be used to endorse or promote products
derived from this software without specific prior
written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.