|
|
@@ -22,7 +22,7 @@ const getSchemeData = new Promise((resolve, reject) => {
|
|
|
method: 'POST',
|
|
|
headers: myHeaders,
|
|
|
body: JSON.stringify({
|
|
|
- "edition": 5,
|
|
|
+ "edition": 7,
|
|
|
"url": tabInfo.url
|
|
|
}),
|
|
|
redirect: 'follow'
|
|
|
@@ -79,17 +79,6 @@ function load() {
|
|
|
getSchemeData.then((dataTemp) => {
|
|
|
// console.log(dataTemp)
|
|
|
const scriptBox = document.getElementsByClassName('script-box')[0]
|
|
|
- if (dataTemp.edition > 5) {
|
|
|
- chrome.notifications.create(null, {
|
|
|
- type: 'basic',
|
|
|
- iconUrl: 'img/48.png',
|
|
|
- title: '版本过低',
|
|
|
- message: '有新版本请在弹出页面下载最新插件!'
|
|
|
- })
|
|
|
- // console.log(unescape(dataTemp.data))
|
|
|
- chrome.tabs.create({url: dataTemp.url})
|
|
|
- return
|
|
|
- }
|
|
|
const data = dataTemp['data']
|
|
|
if (dataTemp.err !== 0 || data.length == 0) {
|
|
|
scriptBox.classList.add('no-scheme')
|