Skip to content

Commit

Permalink
conflict: rm xcuserdata
Browse files Browse the repository at this point in the history
  • Loading branch information
shenruisi committed Jan 7, 2022
2 parents 9e38825 + b065899 commit 3146127
Show file tree
Hide file tree
Showing 42 changed files with 965 additions and 1,317 deletions.
19 changes: 0 additions & 19 deletions Stay Extension/Resources/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ let matchAppScriptList=[];
let matchAppScriptConsole = [];
let gm_console = {};
browser.runtime.onMessage.addListener((request, sender, sendResponse) => {
// if ("popup" == request.from && "fetchAppList" == request.operate){
// sendResponse({ body: appJumpList });
// }
// else if ("content" == request.from && "saveAppList" == request.operate){
// appJumpList = request.data;
// console.log("appJumpList",appJumpList);
// }

if ("bootstrap" == request.from || "iframe" == request.from){
if ("fetchScripts" == request.operate){
console.log("background---fetchScripts request==", request);
Expand All @@ -60,28 +52,18 @@ browser.runtime.onMessage.addListener((request, sender, sendResponse) => {
else if ("setMatchedScripts" == request.operate){
matchAppScriptList = request.matchScripts;
console.log("setMatchedScripts request.matchScripts=",request.matchScripts)
// browser.runtime.sendMessage({ from: "background", operate: "setMatchedScripts",matchAppScriptList:matchAppScriptList }, (response) => {
// console.log("fetchMatchedScriptList---setMatchedScripts--",request,"-res--", response.body)
// })

return true;
}
}
else if ("gm-apis" == request.from){
if ("GM_error" == request.operate){
console.log("gm-apis GM_error, from exect catch, ",request);
// if (gm_console[request.uuid] == null){
// gm_console[request.uuid] = [];
// }
gm_console[request.uuid] = [];
gm_console[request.uuid].push({ msg: request.message, msgType: "error", time: new Date().dateFormat()});
console.log("GM_error=",gm_console);
}
if ("GM_log" == request.operate){
console.log("gm-apis GM_log");
// if (gm_console[request.uuid] == null){
// gm_console[request.uuid] = [];
// }
gm_console[request.uuid] = [];
gm_console[request.uuid].push({ msg: request.message, msgType: "log", time: new Date().dateFormat() });
console.log("GM_log=",gm_console);
Expand Down Expand Up @@ -124,7 +106,6 @@ browser.runtime.onMessage.addListener((request, sender, sendResponse) => {
console.log("fetchMatchedScriptList---fetchMatchedScripts--",response,"-res--", response.body)
sendResponse({ body: matchAppScriptList });
})
// sendResponse({ body: matchAppScriptList });
}else if ("setScriptActive" == request.operate){
browser.runtime.sendNativeMessage("application.id", {type:request.operate, uuid:request.uuid,active: request.active }, function(response) {
sendResponse(response);
Expand Down
191 changes: 0 additions & 191 deletions Stay Extension/Resources/baidu/baidu-content.js

This file was deleted.

26 changes: 0 additions & 26 deletions Stay Extension/Resources/baidu/tieba-content.js

This file was deleted.

16 changes: 5 additions & 11 deletions Stay Extension/Resources/bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
Main entrance of Stay
1. Fetch inject scripts from SafariWebExtensionHandler
2. Use @match, @include, @exclude to match the correct script with the url.
*/
console.log("bootstrap inject");
var __b; if (typeof browser != "undefined") {__b = browser;} if (typeof chrome != "undefined") {__b = chrome;}
var browser = __b;
Expand Down Expand Up @@ -103,14 +108,3 @@ async function start(){
}

start();

browser.runtime.onMessage.addListener((request, sender, sendResponse) => {
if ("background" == request.from){
if ("fetchMatchedScripts" == request.operate) {
console.log("background --- fetchMatchedScripts====",injectScripts);
sendResponse({ body: injectScripts });
}
return true;
}

})
59 changes: 0 additions & 59 deletions Stay Extension/Resources/csdn/csdn-content.js

This file was deleted.

44 changes: 0 additions & 44 deletions Stay Extension/Resources/google/google-content.js

This file was deleted.

Loading

0 comments on commit 3146127

Please sign in to comment.