remove obsolete/unmaintained files from builds directory
This commit is contained in:
parent
d7ba6cf31d
commit
855b41f29c
10263
builds/4chan-X.js
10263
builds/4chan-X.js
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -1,62 +0,0 @@
|
||||
function GM_openInTab(_url) {
|
||||
self.port.emit("GM_openInTab", _url);
|
||||
return; // Should return the Window object
|
||||
};
|
||||
|
||||
function GM_setValue(_name, _value) {
|
||||
localStorage[_name] = _value;
|
||||
return;
|
||||
};
|
||||
|
||||
function GM_getValue(_name, _default) {
|
||||
if (localStorage[_name] === null && _default === null) return null;
|
||||
return (localStorage[_name] || _default);
|
||||
};
|
||||
|
||||
function GM_deleteValue(_name) {
|
||||
localStorage.removeItem(_name);
|
||||
return;
|
||||
};
|
||||
|
||||
function GM_listValues() {
|
||||
return Object.keys(localStorage);
|
||||
};
|
||||
|
||||
function GM_setClipboard(_text) {
|
||||
self.port.emit("GM_setClipboard", _text);
|
||||
};
|
||||
|
||||
//Deprecated
|
||||
function GM_log(_message) {
|
||||
console.log(_message);
|
||||
return;
|
||||
};
|
||||
|
||||
function GM_xmlhttpRequest(_details) {
|
||||
//Ugly hack? Race condition? Memory leak?
|
||||
_onload = _details.onload;
|
||||
_context = _details.context;
|
||||
self.port.emit("GM_xmlhttpRequest", _details);
|
||||
};
|
||||
|
||||
self.port.on("callback_GM_xmlhttpRequest", function(_response) {
|
||||
_response.context = _context;
|
||||
_onload(_response);
|
||||
});
|
||||
|
||||
function GM_addStyle(_css) {
|
||||
self.port.emit("GM_addStyle", _css);
|
||||
}
|
||||
|
||||
var GM_info = new Object();
|
||||
GM_info.version = '1.15';
|
||||
GM_info.scriptWillUpdate = true;
|
||||
|
||||
//To do
|
||||
function GM_registerMenuCommand(_caption, _commandFunc, _accessKey) {
|
||||
return;
|
||||
}
|
||||
|
||||
self.port.on("load-userscript", function(_script) {
|
||||
eval(_script);
|
||||
});
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 185 B |
Binary file not shown.
|
Before Width: | Height: | Size: 232 B |
@ -1,82 +0,0 @@
|
||||
var data = require("sdk/self").data;
|
||||
var Request = require("sdk/request").Request;
|
||||
var tabs = require("sdk/tabs");
|
||||
var system = require("sdk/system");
|
||||
if (system.platform !== 'android') {
|
||||
// Clipboard is not supported on Android
|
||||
var clipboard = require("sdk/clipboard");
|
||||
}
|
||||
var pageMod = require("sdk/page-mod");
|
||||
pageMod.PageMod({
|
||||
include: ["*.4chan.org", "*.4cdn.org"],
|
||||
contentScriptFile: data.url("greaseshim.js"),
|
||||
contentScriptWhen: "start",
|
||||
onAttach: function(worker) {
|
||||
worker.port.emit("load-userscript", data.load("4chan-X.user.js"));
|
||||
|
||||
//GM_openInTab
|
||||
worker.port.on("GM_openInTab", function(url) {
|
||||
tabs.open(url);
|
||||
});
|
||||
|
||||
//GM_setClipboard
|
||||
worker.port.on("GM_setClipboard", function(text) {
|
||||
if (system.platform !== 'android') {
|
||||
// Clipboard is not supported on Android
|
||||
clipboard.set(text);
|
||||
}
|
||||
});
|
||||
|
||||
//GM_xmlhttpRequest
|
||||
worker.port.on("GM_xmlhttpRequest", function(details) {
|
||||
request = new Object();
|
||||
request.url = details.url;
|
||||
if (details.headers) {
|
||||
request.headers = details.headers;
|
||||
if (details.headers["Content-Type"]) {request.contentType = details.headers["Content-Type"]};
|
||||
};
|
||||
if (details.data) {request.content = encodeURIComponent(details.data)};
|
||||
if (details.overrideMimeType) {request.overrideMimeType = details.overrideMimeType};
|
||||
|
||||
request.onComplete = function(response) {
|
||||
response.finalUrl = details.url;
|
||||
response.responseText = response.text;
|
||||
for (var headerName in response.headers) {
|
||||
_string = headerName + ": " + response.headers[headerName] + " \n";
|
||||
response.responseHeaders += _string;
|
||||
}
|
||||
response.readyState = 4;
|
||||
worker.port.emit("callback_GM_xmlhttpRequest", response);
|
||||
}
|
||||
|
||||
xhr = Request(request);
|
||||
|
||||
switch(details.method){
|
||||
case "GET":
|
||||
xhr.get();
|
||||
break;
|
||||
case "POST":
|
||||
xhr.post();
|
||||
break;
|
||||
case "HEAD":
|
||||
xhr.head();
|
||||
break;
|
||||
case "PUT":
|
||||
xhr.put();
|
||||
break;
|
||||
default: xhr.get();
|
||||
}
|
||||
});
|
||||
|
||||
//GM_addStyle
|
||||
worker.port.on("GM_addStyle", function(css) {
|
||||
tabs.activeTab.attach({
|
||||
contentScript: "var style = document.createElement('style');" +
|
||||
"style.type = 'text/css';" +
|
||||
"style.innerHTML = '" + css + "';" +
|
||||
"document.head.appendChild(style);"
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
@ -1,9 +0,0 @@
|
||||
{
|
||||
"name": "4chanx",
|
||||
"title": "4chan X",
|
||||
"id": "72DAF86E-9689-11E3-8BA3-F4B66188709B",
|
||||
"description": "Adds various features to 4chan.",
|
||||
"author": "Spittie",
|
||||
"license": "MIT",
|
||||
"version": "1.4.1"
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
var main = require("./main");
|
||||
|
||||
exports["test main"] = function(assert) {
|
||||
assert.pass("Unit test running!");
|
||||
};
|
||||
|
||||
exports["test main async"] = function(assert, done) {
|
||||
assert.pass("async Unit test running!");
|
||||
done();
|
||||
};
|
||||
|
||||
require("sdk/test").run(exports);
|
||||
Loading…
x
Reference in New Issue
Block a user