refactor: update workflow names to Chinese and remove unnecessary console log
All checks were successful
构建扩展程序 / build (push) Successful in 57s
All checks were successful
构建扩展程序 / build (push) Successful in 57s
This commit is contained in:
parent
ccd5545779
commit
baaf451978
|
@ -1,4 +1,4 @@
|
||||||
name: Build Extension
|
name: 构建扩展程序
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -12,19 +12,20 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
name: 检出代码
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: 设置 Node.js
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '18'
|
node-version: '18'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: 安装依赖
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|
||||||
- name: Build extension
|
- name: 构建扩展程序
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
- name: Upload build artifacts
|
- name: 上传工件
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: extension-build
|
name: extension-build
|
||||||
|
|
|
@ -13,7 +13,6 @@ chrome.webRequest.onBeforeRequest.addListener(
|
||||||
details.frameId === 0
|
details.frameId === 0
|
||||||
) {
|
) {
|
||||||
const pref = await chrome.storage.sync.get('preferences')
|
const pref = await chrome.storage.sync.get('preferences')
|
||||||
console.log(pref.preferences.autoRedirect)
|
|
||||||
|
|
||||||
if (pref === undefined || pref.preferences === undefined || pref.preferences.autoRedirect === undefined || pref.preferences.autoRedirect === true) {
|
if (pref === undefined || pref.preferences === undefined || pref.preferences.autoRedirect === undefined || pref.preferences.autoRedirect === true) {
|
||||||
chrome.tabs.create({ url: chrome.runtime.getURL('index.html') })
|
chrome.tabs.create({ url: chrome.runtime.getURL('index.html') })
|
||||||
|
|
Loading…
Reference in New Issue
Block a user