Commit 63450f46 by chencong

插件添加测试文件

parent 1d1991ec
<!DOCTYPE html><html><head><meta charset=UTF-8><title></title><link href=/out/js/background.js rel=preload as=script><link href=/out/js/chunk-vendors.chunk.js rel=preload as=script></head><body><script src=/out/js/chunk-vendors.chunk.js></script><script src=/out/js/background.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=UTF-8><title>内容脚本</title><link href=/out/css/contentscript.css rel=preload as=style><link href=/out/js/chunk-vendors.chunk.js rel=preload as=script><link href=/out/js/contentscript.js rel=preload as=script><link href=/out/css/contentscript.css rel=stylesheet></head><body>内容脚本内容<script src=/out/js/chunk-vendors.chunk.js></script><script src=/out/js/contentscript.js></script></body></html>
\ No newline at end of file
.main_popup[data-v-d068b638]{width:200px;height:100px}.index[data-v-d068b638]{width:100%;height:100%;font-size:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row nowrap;flex-flow:row nowrap}.index .switch[data-v-d068b638]{display:inline-block;width:76px;height:36px;padding:3px;position:relative}.index .switch[data-v-d068b638]:hover{cursor:pointer}.index .slide[data-v-d068b638]{position:absolute;left:0;right:0;bottom:0;top:0;background:#ccc;border-radius:36px}.index .slide[data-v-d068b638]:before{margin:3px;content:"OFF";display:inline-block;position:absolute;left:0;top:0;width:30px;height:30px;line-height:30px;text-align:center;background:#fff;border-radius:50%;-webkit-transition:all .3s linear;transition:all .3s linear;-webkit-box-shadow:2px 2px 2px rgba(0,0,0,.3);box-shadow:2px 2px 2px rgba(0,0,0,.3);font-size:12px}.index #switch:checked+.slide[data-v-d068b638]{background:#2196f3}.index #switch:checked+.slide[data-v-d068b638]:before{content:"ON";-webkit-transform:translate(40px);transform:translate(40px);-webkit-box-shadow:-2px 2px 2px rgba(0,0,0,.3);box-shadow:-2px 2px 2px rgba(0,0,0,.3)}
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>cc</title>
</head>
<body>
<noscript>
<strong>We're sorry but cc doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
(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")},"519d":function(t,e){},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);n("519d"),n("e92b").Buffer;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="1564416000000";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){var e=t.data.origin.includes("60.12.216.130"),n="\n var isInnerto = ".concat(e,'\n function FindProxyForURL(url, host) {\n if (shExpMatch(url, "https:*weixin.sogou.com*") && isInnerto) {\n return "PROXY 192.168.0.36:31128";\n }\n return "DIRECT";\n }\n '),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.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
(function(t){function e(e){for(var r,o,u=e[0],a=e[1],l=e[2],p=0,f=[];p<u.length;p++)o=u[p],i[o]&&f.push(i[o][0]),i[o]=0;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(t[r]=a[r]);s&&s(e);while(f.length)f.shift()();return c.push.apply(c,l||[]),n()}function n(){for(var t,e=0;e<c.length;e++){for(var n=c[e],r=!0,u=1;u<n.length;u++){var a=n[u];0!==i[a]&&(r=!1)}r&&(c.splice(e--,1),t=o(o.s=n[0]))}return t}var r={},i={popup:0},c=[];function o(e){if(r[e])return r[e].exports;var n=r[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=t,o.c=r,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="/out/";var u=window["webpackJsonp"]=window["webpackJsonp"]||[],a=u.push.bind(u);u.push=e,u=u.slice();for(var l=0;l<u.length;l++)e(u[l]);var s=a;c.push([1,"chunk-vendors"]),n()})({1:function(t,e,n){t.exports=n("7331")},1015:function(t,e,n){},7331:function(t,e,n){"use strict";n.r(e);n("cadf"),n("551c"),n("f751"),n("097d");var r=n("2b0e"),i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"main_popup"},[n("div",{staticClass:"index container"},[n("label",{staticClass:"switch",attrs:{for:"switch"}},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.switchPlugin,expression:"switchPlugin"}],attrs:{type:"checkbox",name:"zhiwei_plugin_switch",id:"switch",hidden:"","true-value":!0,"false-value":!1},domProps:{checked:Array.isArray(t.switchPlugin)?t._i(t.switchPlugin,null)>-1:t.switchPlugin},on:{change:function(e){var n=t.switchPlugin,r=e.target,i=!!r.checked;if(Array.isArray(n)){var c=null,o=t._i(n,c);r.checked?o<0&&(t.switchPlugin=n.concat([c])):o>-1&&(t.switchPlugin=n.slice(0,o).concat(n.slice(o+1)))}else t.switchPlugin=i}}}),n("span",{staticClass:"slide"})])])])},c=[],o={name:"popup",data:function(){return{switchPlugin:!0}},mounted:function(){var t=this;chrome.storage.local.get("pluginSwitch",function(e){e.hasOwnProperty("pluginSwitch")&&(t.switchPlugin=e.pluginSwitch)})},watch:{switchPlugin:function(t,e){var n=chrome.storage.local;n.set({pluginSwitch:t})}}},u=o,a=(n("b9a4"),n("2877")),l=Object(a["a"])(u,i,c,!1,null,"d068b638",null),s=l.exports;r["a"].config.productionTip=!1,new r["a"]({el:"#popup",render:function(t){return t(s)}})},b9a4:function(t,e,n){"use strict";var r=n("1015"),i=n.n(r);i.a}});
//# sourceMappingURL=popup.js.map
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=UTF-8><title>弹框</title><link href=/out/css/popup.css rel=preload as=style><link href=/out/js/chunk-vendors.chunk.js rel=preload as=script><link href=/out/js/popup.js rel=preload as=script><link href=/out/css/popup.css rel=stylesheet></head><body><div id=popup></div><script src=/out/js/chunk-vendors.chunk.js></script><script src=/out/js/popup.js></script></body></html><style></style>
\ No newline at end of file
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