Commit f6037817 by chencong

修改测试文件

parent eaa4450f
(function(t){function e(e){for(var n,r,i=e[0],s=e[1],l=e[2],f=0,d=[];f<i.length;f++)r=i[f],a[r]&&d.push(a[r][0]),a[r]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(t[n]=s[n]);u&&u(e);while(d.length)d.shift()();return c.push.apply(c,l||[]),o()}function o(){for(var t,e=0;e<c.length;e++){for(var o=c[e],n=!0,i=1;i<o.length;i++){var s=o[i];0!==a[s]&&(n=!1)}n&&(c.splice(e--,1),t=r(r.s=o[0]))}return t}var n={},a={background:0},c=[];function r(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=n,r.d=function(t,e,o){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(o,n,function(e){return t[e]}.bind(null,n));return o},r.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/out/";var i=window["webpackJsonp"]=window["webpackJsonp"]||[],s=i.push.bind(i);i.push=e,i=i.slice();for(var l=0;l<i.length;l++)e(i[l]);var u=s;c.push([5,"chunk-vendors"]),o()})({5:function(t,e,o){t.exports=o("f728")},f728:function(t,e,o){"use strict";o.r(e);o("ac6a"),o("456d"),o("6762"),o("2fdb"),o("cadf"),o("551c"),o("f751"),o("097d");var n=o("7f43"),a=o.n(n);a.a.defaults.withCredentials=!0,a.a.interceptors.response.use(function(t){if(console.log("添加响应拦截器",t),200!==t.status||!t.data||"插件版本过低,请升级"!==t.data.message)return t;chrome.notifications.create(Math.random()+"",{type:"basic",iconUrl:"images/icon_19.png",title:"通知",message:"插件版本过低,请升级"},function(t){console.log(t)})});var c=!0,r="http://yuqing.zhiweidata.com/qbjcbackPhoenix/",i="1561017600000";function s(){a.a.get("".concat(r,"interface/getGroupInfo/").concat(i,".do")).then(function(t){chrome.storage.local.set({configure:t.data},function(){console.log("save success")})}).catch(function(t){console.log(t)})}document.addEventListener("DOMContentLoaded",function(){a()({url:"https://httpbin.org/ip",method:"GET"}).then(function(t){console.log(t.data.origin);var e=t.data.origin.includes("60.12.216.130");console.log(e);var o="\n var isInner = ".concat(e,"\n var direct = 'DIRECT;'\n var proxyinner = 'PROXY 192.168.0.36:31128'\n function FindProxyForURL(url, host) {\n if (shExpMatch(url, \"https:*weixin.sogou.com*\") && isInner){\n return proxyinner\n } else {\n return direct;\n }\n }\n "),n={value:{mode:"pac_script",pacScript:{data:o,mandatory:!0}},scope:"regular"};chrome.proxy.settings.set(n,function(){console.log("set success")})})}),chrome.runtime.onMessage.addListener(function(t,e,o){if("strong"===t.action){var n=t.data;return chrome.storage.local.get("configure",function(t){console.log("11111111111"),console.log(t),n.projectList=t.configure}),chrome.storage.local.get("project",function(t){n.project=t.project}),chrome.storage.local.get("user",function(t){n.user=t.user}),chrome.storage.local.get("rightStatue",function(t){Object.keys(t).length>0&&(n.rightStatue=t.rightStatue,o({data:n}))}),!0}if("SetStrong"===t.action)chrome.storage.local.set(t.data);else{if("getstrong"===t.action)return console.log("但是事实上身上"),console.log(t),chrome.storage.local.get(t.data,function(t){console.log(t),o({data:t})}),!0;if("checkUpmark"===t.action){var c=t.params.project,s=null,l=null;return l="微博"===t.value[0].data.clientFrom?t.value.map(function(t){return{id:t.data.id,url:t.data.url,mark:!1,mid:t.data.mid,time:t.data.time}}):t.value.map(function(t){return{id:t.data.id,mark:!1,source:t.data.source,time:t.data.time,title:t.data.title,url:t.data.url}}),a.a.post("".concat(r,"interface/getDataMore/").concat(i,".do"),{company:c,mark:l,type:t.value[0].data.clientFrom},{headers:{time:(new Date).valueOf()}}).then(function(t){s=t.data,console.log(55555555555),o({data:s,tabProject:c})}).catch(function(t){console.log(t)}),!0}if("doingMark"===t.action)return a.a.post("".concat(r,"interface/markDataMoreBiz/").concat(i,".do"),t.value,{headers:{time:(new Date).valueOf()}}).then(function(t){var e=t.data;o({data:e})}).catch(function(t){console.log(t)}),!0;if("open"===t.action)chrome.browserAction.setIcon({path:"images/icon.png"});else{if("xhttp"===t.action)return a.a.get("".concat(r).concat(t.url,"/").concat(i,".do"),{params:t.params}).then(function(t){console.log(t),o({data:t.data})}).catch(function(t){console.log(t)}),!0;if("weiboxhttp"===t.action)return a.a.get("".concat(t.url)).then(function(t){console.log(t),o({data:t.data})}).catch(function(t){console.log(t)}),!0}}}),chrome.browserAction.setIcon({path:"images/icon.png"}),chrome.browserAction.onClicked.addListener(function(){c=!c,c?(chrome.browserAction.setIcon({path:"images/icon.png"}),chrome.storage.sync.set({isopen:!0})):(chrome.browserAction.setIcon({path:"images/icon2.png"}),chrome.storage.sync.set({isopen:!1}))}),chrome.contextMenus.create({title:"测试右键菜单",onclick:function(){alert("您点击了右键菜单!")}}),chrome.contextMenus.create({title:"使用度娘搜索:%s",contexts:["selection"],onclick:function(t){chrome.tabs.create({url:"https://www.baidu.com/s?ie=utf-8&wd="+encodeURI(t.selectionText)})}}),chrome.storage.local.get("configure",function(t){var e=t.configure;console.log("1234545487645"),console.log(e),e?console.log("has get defaultURL"):s()})}});
//# sourceMappingURL=background.js.map
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment