Commit ec3b5519 by chencong

修改测试文件

parent 760f0a3a
(function(t){function e(e){for(var o,c,i=e[0],u=e[1],l=e[2],f=0,d=[];f<i.length;f++)c=i[f],a[c]&&d.push(a[c][0]),a[c]=0;for(o in u)Object.prototype.hasOwnProperty.call(u,o)&&(t[o]=u[o]);s&&s(e);while(d.length)d.shift()();return r.push.apply(r,l||[]),n()}function n(){for(var t,e=0;e<r.length;e++){for(var n=r[e],o=!0,i=1;i<n.length;i++){var u=n[i];0!==a[u]&&(o=!1)}o&&(r.splice(e--,1),t=c(c.s=n[0]))}return t}var o={},a={background:0},r=[];function c(e){if(o[e])return o[e].exports;var n=o[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,c),n.l=!0,n.exports}c.m=t,c.c=o,c.d=function(t,e,n){c.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},c.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},c.t=function(t,e){if(1&e&&(t=c(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(c.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)c.d(n,o,function(e){return t[e]}.bind(null,o));return n},c.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return c.d(e,"a",e),e},c.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},c.p="/out/";var i=window["webpackJsonp"]=window["webpackJsonp"]||[],u=i.push.bind(i);i.push=e,i=i.slice();for(var l=0;l<i.length;l++)e(i[l]);var s=u;r.push([5,"chunk-vendors"]),n()})({5:function(t,e,n){t.exports=n("f728")},f728:function(t,e,n){"use strict";n.r(e);n("ac6a"),n("456d"),n("6762"),n("2fdb"),n("7514"),n("cadf"),n("551c"),n("f751"),n("097d");var o=n("7f43"),a=n.n(o);chrome.management.getAll(function(t){console.log(888);var e=t.find(function(t){return"知微舆情"===t.description}).id;console.log(e),chrome.storage.local.set({ExtensionID:e})}),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 r="http://yuqing.zhiweidata.com/qbjcbackPhoenix/",c="1561017600000";function i(t,e,n){if(console.log(t),console.log(n),"strong"===t.action){var o=t.data;return chrome.storage.local.get("configure",function(t){o.projectList=t.configure}),chrome.storage.local.get("project",function(t){o.project=t.project}),chrome.storage.local.get("user",function(t){o.user=t.user}),chrome.storage.local.get("rightStatue",function(t){Object.keys(t).length>0&&(o.rightStatue=t.rightStatue,n({data:o}))}),!0}if("SetStrong"===t.action)chrome.storage.local.set(t.data);else{if("getstrong"===t.action)return chrome.storage.local.get(t.data,function(t){console.log(t),n({data:t})}),!0;if("checkUpmark"===t.action){var i=t.params.project,u=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(c,".do"),{company:i,mark:l,type:t.value[0].data.clientFrom},{headers:{time:(new Date).valueOf()}}).then(function(t){u=t.data,console.log(55555555555),n({data:u,tabProject:i})}).catch(function(t){console.log(t)}),!0}if("doingMark"===t.action)return a.a.post("".concat(r,"interface/markDataMoreBiz/").concat(c,".do"),t.value,{headers:{time:(new Date).valueOf()}}).then(function(t){var e=t.data;n({data:e})}).catch(function(t){console.log(t)}),!0;if("open"===t.action);else{if("xhttp"===t.action)return a.a.get("".concat(r).concat(t.url,"/").concat(c,".do"),{params:t.params}).then(function(t){console.log(t),n({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),n({data:t.data})}).catch(function(t){console.log(t)}),!0}}}function u(){a.a.get("".concat(r,"interface/getGroupInfo/").concat(c,".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 n="\n\t var isInner = ".concat(e,"\n\t var direct = 'DIRECT;'\n\t var proxyinner = 'PROXY 192.168.0.36:31128'\n\t function FindProxyForURL(url, host) {\n\t if (shExpMatch(url, \"https:*weixin.sogou.com*\") && isInner){\n\t return proxyinner\n\t } else {\n\t return direct;\n\t }\n\t }\n\t "),o={value:{mode:"pac_script",pacScript:{data:n,mandatory:!0}},scope:"regular"};chrome.proxy.settings.set(o,function(){console.log("set success")})})}),chrome.runtime.onMessageExternal.addListener(function(t,e,n){return i(t,e,n),!0}),chrome.runtime.onMessage.addListener(function(t,e,n){return i(t,e,n),!0}),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(e),e?console.log("has get defaultURL"):u()})}});
//# 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