Просмотр исходного кода

Merge remote-tracking branch 'upstream/master'

hawkeye116477 8 лет назад
Родитель
Сommit
7ea017ef79

+ 1 - 0
.postcssrc.js

@@ -1,4 +1,5 @@
 module.exports = {
 module.exports = {
+  parser: require('postcss-scss'),
   plugins: [
   plugins: [
     require('precss'),
     require('precss'),
   ],
   ],

+ 2 - 1
gulpfile.js

@@ -14,7 +14,8 @@ const pkg = require('./package.json');
 const paths = {
 const paths = {
   manifest: 'src/manifest.json',
   manifest: 'src/manifest.json',
   copy: [
   copy: [
-    'src/public/**',
+    'src/public/images/**',
+    'src/public/lib/**',
   ],
   ],
   locales: [
   locales: [
     'src/_locales/**',
     'src/_locales/**',

+ 12 - 13
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "violentmonkey",
   "name": "violentmonkey",
-  "version": "2.7.1",
+  "version": "2.7.2",
   "scripts": {
   "scripts": {
     "dev": "gulp watch",
     "dev": "gulp watch",
     "prebuild": "npm run lint && gulp clean",
     "prebuild": "npm run lint && gulp clean",
@@ -25,14 +25,12 @@
     "babili-webpack-plugin": "^0.1.2",
     "babili-webpack-plugin": "^0.1.2",
     "css-loader": "^0.28.4",
     "css-loader": "^0.28.4",
     "del": "^3.0.0",
     "del": "^3.0.0",
-    "eslint": "^4.0.0",
+    "eslint": "^4.2.0",
     "eslint-config-airbnb-base": "^11.2.0",
     "eslint-config-airbnb-base": "^11.2.0",
-    "eslint-friendly-formatter": "^3.0.0",
     "eslint-import-resolver-webpack": "^0.8.3",
     "eslint-import-resolver-webpack": "^0.8.3",
-    "eslint-loader": "^1.8.0",
-    "eslint-plugin-html": "^3.0.0",
-    "eslint-plugin-import": "^2.6.1",
-    "extract-text-webpack-plugin": "^2.1.2",
+    "eslint-plugin-html": "^3.1.0",
+    "eslint-plugin-import": "^2.7.0",
+    "extract-text-webpack-plugin": "^3.0.0",
     "friendly-errors-webpack-plugin": "^1.6.1",
     "friendly-errors-webpack-plugin": "^1.6.1",
     "gulp": "^3.9.1",
     "gulp": "^3.9.1",
     "gulp-filter": "^5.0.0",
     "gulp-filter": "^5.0.0",
@@ -41,19 +39,20 @@
     "gulp-util": "^3.0.7",
     "gulp-util": "^3.0.7",
     "html-webpack-plugin": "^2.29.0",
     "html-webpack-plugin": "^2.29.0",
     "husky": "^0.14.3",
     "husky": "^0.14.3",
-    "js-yaml": "^3.8.4",
+    "js-yaml": "^3.9.0",
     "localStorage": "^1.0.3",
     "localStorage": "^1.0.3",
     "postcss-loader": "^2.0.6",
     "postcss-loader": "^2.0.6",
+    "postcss-scss": "^1.0.2",
     "precss": "^2.0.0",
     "precss": "^2.0.0",
     "svgo": "^0.7.2",
     "svgo": "^0.7.2",
     "tape": "^4.7.0",
     "tape": "^4.7.0",
     "through2": "^2.0.3",
     "through2": "^2.0.3",
-    "vue-loader": "^13.0.0",
+    "vue-loader": "^13.0.2",
     "vue-style-loader": "^3.0.1",
     "vue-style-loader": "^3.0.1",
-    "vue-template-compiler": "^2.3.4",
-    "webpack": "^3.0.0",
+    "vue-template-compiler": "^2.4.1",
+    "webpack": "^3.3.0",
     "webpack-bundle-size-analyzer": "^2.7.0",
     "webpack-bundle-size-analyzer": "^2.7.0",
-    "wrapper-webpack-plugin": "^0.1.11"
+    "wrapper-webpack-plugin": "^1.0.0"
   },
   },
   "author": "Gerald <[email protected]>",
   "author": "Gerald <[email protected]>",
   "repository": {
   "repository": {
@@ -69,7 +68,7 @@
     "codemirror": "^5.27.4",
     "codemirror": "^5.27.4",
     "core-js": "^2.4.1",
     "core-js": "^2.4.1",
     "sync-promise-lite": "^0.2.3",
     "sync-promise-lite": "^0.2.3",
-    "vue": "^2.3.4",
+    "vue": "^2.4.1",
     "vue-code": "^1.2.2"
     "vue-code": "^1.2.2"
   }
   }
 }
 }

+ 0 - 9
scripts/webpack.base.conf.js

@@ -38,15 +38,6 @@ module.exports = {
   },
   },
   module: {
   module: {
     rules: [
     rules: [
-      // {
-      //   test: /\.(js|vue)$/,
-      //   loader: 'eslint-loader',
-      //   enforce: 'pre',
-      //   include: [resolve('src'), resolve('test')],
-      //   options: {
-      //     formatter: require('eslint-friendly-formatter')
-      //   }
-      // },
       {
       {
         test: /\.vue$/,
         test: /\.vue$/,
         loader: 'vue-loader',
         loader: 'vue-loader',

+ 408 - 0
src/_locales/hr/messages.yml

@@ -0,0 +1,408 @@
+extName:
+  description: Ime ove extenzije.
+  message: Violentmonkey
+extDescription:
+  description: Opis ove extenzije.
+  message: Omogućava korištenje korisničkih skripti u web pregledniku.
+msgUpdated:
+  description: Poruka koja se prikazuje kada je skripta obnovljena/reinstalirana.
+  message: Skripta je obnovljena.
+msgErrorFetchingScript:
+  description: Message shown when Violentmonkey fails fetching a new version of the script.
+  message: Greška pri dohvaćanju skripte!
+msgInstalled:
+  description: Message shown when a script is installed.
+  message: Skripta je instalirana.
+Warning:
+  description: Pokaži upozorenja s notifikacijom.
+  message: Upozorenje
+  touched: false
+msgWarnGrant:
+  description: Poruka koja se pirkazuje kad `@grant` nije nađen u skripti.
+  message: 'Skripta [$1] nema `@grant` linije! Klikni da vidiš više detalja.'
+  touched: false
+labelNoName:
+  description: Text as the name of a script when no @name is assigned.
+  message: Nema imena
+msgUpdating:
+  description: Message shown when a new version of script is being fetched.
+  message: Obnavljam...
+msgNewVersion:
+  description: >-
+    Message shown when a new version of script is found by @updateURL, but no
+    @downloadURL is provided.
+  message: Nađena je nova vezija.
+msgCheckingForUpdate:
+  description: Message shown when a script is being checked for updates by version numbers.
+  message: Tražim obnavljanja...
+msgErrorFetchingUpdateInfo:
+  description: Message shown when Violentmonkey fails fetching version data of the script.
+  message: Neuspjelo dohvaćanje informacija o obnovama.
+msgNoUpdate:
+  description: Message shown when there is no new version of a script.
+  message: Obnavljanja nisu nađena.
+labelInstall:
+  description: Shown in the title of the confirm page while trying to install a script.
+  message: Instaliranje skripte
+buttonInstallOptions:
+  description: Button to show options of installation confirm page.
+  message: Opcije
+installOptionClose:
+  description: Option to close confirm window after installation.
+  message: Zatvori nakon instalacije
+installOptionTrack:
+  description: Option to track the loading local file before window is closed.
+  message: Track lokalni fajl prije no što se ovaj prozor zatvori
+buttonConfirmInstallation:
+  description: Gumb kojim se potvrđuje instalacija skripte.
+  message: Potvrdi instalaciju
+buttonClose:
+  description: Gumb za zatvaranje prozora.
+  message: Zatvori
+msgErrorLoadingData:
+  description: >-
+    Message shown on confirm page when the script to be installed cannot be
+    loaded.
+  message: Greška pri učitavanju podataka skripte.
+msgLoadedData:
+  description: >-
+    Message shown in the confirm page when a javascript file to be installed is
+    loaded.
+  message: Podaci skripte su učitani.
+msgErrorLoadingDependency:
+  description: Message shown when not all requirements are loaded successfully.
+  message: Greška pri učitavanju dependencija.
+msgLoadingDependency:
+  description: Message shown on confirm page when the requirements are being downloaded.
+  message: Učitavam dependencije... ($1/$2)
+msgLoadingData:
+  description: Message shown on confirm page when the script to be installed is loading.
+  message: Učitavam podatke skripte...
+sideMenuInstalled:
+  description: 'Side menu: Instalirane skripte'
+  message: Instalirane skripte
+sideMenuSettings:
+  description: 'Side menu: Postavke'
+  message: Postavke
+sideMenuAbout:
+  description: 'Side menu: About'
+  message: O extenziji
+buttonNew:
+  description: Gumb za kreiranje nove skripte.
+  message: Nova
+buttonUpdateAll:
+  description: Check all scripts for updates.
+  message: Provjeri obnove za sve skripte
+anchorGetMoreScripts:
+  description: Link to get more scripts.
+  message: Nađi više skripti
+  touched: false
+msgLoading:
+  description: Message shown in the options page before script list is loaded.
+  message: Učitavam ...
+labelSettings:
+  description: Label shown on the top of settings page
+  message: Postavke
+labelAutoUpdate:
+  description: Option to allow automatically checking scripts for updates every 24 hours.
+  message: Automatski provjeri obnavljanja skripti svaki dan
+labelIgnoreGrant:
+  description: Option to suppress no @grant warnings.
+  message: Potisni no @grant upozorenja
+  touched: false
+labelDataImport:
+  description: Section title of data import.
+  message: Uvoz Podataka
+buttonImportData:
+  description: Button to choose a file for data import.
+  message: Uvezi iz zip arhive
+buttonVacuum:
+  description: Button to vacuum extension data.
+  message: Vakuumiraj databazu
+labelDataExport:
+  description: Section title of data export.
+  message: Izvoz Podataka
+labelExportScriptData:
+  description: Option to export script data along with scripts.
+  message: Izvezi podatke skripte
+buttonAllNone:
+  description: Button to select all scripts or none.
+  message: Sve/Ništa
+buttonExportData:
+  description: Button to open the data export dialog.
+  message: Izvezi u zip
+labelAbout:
+  description: Label shown on top of the about page.
+  message: O Violentmonkey
+labelRelated:
+  description: Label of related links.
+  message: 'Povezani linkovi: '
+labelDonate:
+  description: Label of link to donate page.
+  message: Doniraj
+labelFeedback:
+  description: Label of link to feedback page.
+  message: Feedback
+labelAuthor:
+  description: Label of author shown in the details of a script.
+  message: 'Autor: '
+anchorAuthor:
+  description: Author shown on about tab.
+  message: '<a href=mailto:[email protected]>Gerald</a>'
+labelTranslator:
+  description: Label of translator.
+  message: 'Prevoditelj: '
+anchorTranslator:
+  description: Translator shown on about tab.
+  message: 'diomed'
+labelCurrentLang:
+  description: Label of current language.
+  message: 'Trenutni jezik: '
+labelScriptEditor:
+  description: Shown in the title of the script editing page.
+  message: Editor Skripte
+labelName:
+  description: Label of script name.
+  message: 'Ime:'
+labelRunAt:
+  description: Label of script @run-at properties in custom meta data.
+  message: 'Run-At:'
+labelRunAtDefault:
+  description: Shown when custom @run-at is not assigned.
+  message: (Default)
+labelHomepageURL:
+  description: Label of script @homepageURL in custom meta data.
+  message: 'Homepage URL:'
+labelUpdateURL:
+  description: Label of script @updateURL in custom meta data.
+  message: 'Update URL:'
+labelDownloadURL:
+  description: Label of script @downloadURL in custom meta data.
+  message: 'Download URL:'
+labelInclude:
+  description: Label of @include rules.
+  message: '@include rules'
+labelMatch:
+  description: Label of @match rules.
+  message: '@match rules'
+labelExclude:
+  description: Label of @exclude rules.
+  message: '@exclude rules'
+labelExcludeMatch:
+  description: Label of @exclude-match rules.
+  message: '@exclude-match rules'
+labelAllowUpdate:
+  description: Option to allow checking updates for a script.
+  message: Dopusti obnavljanje
+buttonSave:
+  description: Button to save modifications of a script.
+  message: Sačuvaj
+buttonSaveClose:
+  description: Button to save modifications of a script and then close the editing page.
+  message: Sačuvaj & Zatvori
+labelNoScripts:
+  description: Poruka koja se prikazuje kad nijedna skripta nije instalirana.
+  message: 'Ups, još nemaš nijednu skriptu.'
+buttonDisable:
+  description: Button to disable a script.
+  message: Onemogući
+buttonEnable:
+  description: Gumb za omogućavanje skripte.
+  message: Omogući
+buttonEdit:
+  description: Gumb za uređivanje skripte.
+  message: Uredi
+buttonRemove:
+  description: Gumb za micanje skripte.
+  message: Makni
+buttonUpdate:
+  description: Check a script for updates.
+  message: Provjeri za obnove
+msgImported:
+  description: >-
+    Message shown after import. There is an argument referring to the count of
+    scripts imported.
+  message: $1 stavki je uvezeno.
+hintUseDownloadURL:
+  description: Shown as a place holder for @updateURL when it is not assigned
+  message: Use @downloadURL
+confirmNotSaved:
+  description: Confirm message shown when there are unsaved script modifications.
+  message: |-
+    Modifikacije nisu sačuvane!
+    Klikni OK da ih odbaciš ili poništi kako bi ostao.
+buttonVacuuming:
+  description: Message shown when data vacuum is in progress.
+  message: Vakuumiranje podataka...
+buttonVacuumed:
+  description: Message shown when data is vacuumed.
+  message: Podaci su vakuumirani
+hintVacuum:
+  description: Hint for vacuuming data.
+  message: Discard the redundancy i pokušaj ponovo učitati nedostajuće resurse u cache.
+menuFindScripts:
+  description: Menu item to find scripts for a site.
+  message: Nađi skripte za ovaj sajt
+menuScriptEnabled:
+  description: 'Menu item showing the status of Violentmonkey, when enabled.'
+  message: Skripte omogućene
+menuScriptDisabled:
+  description: 'Menu item showing the status of Violentmonkey, when disabled.'
+  message: Skripta je onemogućena
+menuCommands:
+  description: Menu item to list script commands.
+  message: Komande skripti
+labelSearch:
+  description: Label for search input in search box.
+  message: 'Traži: '
+labelReplace:
+  description: Label for replace input in search box.
+  message: 'Zamijeni sa: '
+buttonReplace:
+  description: Button to replace the current match.
+  message: Zamijeni
+buttonReplaceAll:
+  description: Button to replace all matches.
+  message: Sve
+labelAutoReloadCurrentTab:
+  description: Option to reload current tab after a script is switched on or off from menu.
+  message: Ponovo učitaj trenutni tab nakon klika na on/off skripte iz menia
+hintInputURL:
+  description: Hint for a prompt box to input URL of a user script.
+  message: 'Input URL:'
+buttonInstallFromURL:
+  description: Button to ask for URL of a user script.
+  message: Instaliraj s linka
+labelSync:
+  description: Label for sync options.
+  message: Sinkronizacija
+lastSync:
+  description: Label for last sync timestamp.
+  message: Posljednja sinkronizacija $1
+msgSyncInit:
+  description: Message shown when sync service is initializing.
+  message: Inicijalizacija...
+msgSyncInitError:
+  description: Message shown when sync fails in initialization.
+  message: Greška pri inicijalizaciji!
+msgSyncReady:
+  description: Message shown when sync will start soon.
+  message: Sinkronizacija će uskoro početi...
+msgSyncing:
+  description: Message shown when sync is in progress.
+  message: Sinkronizacija u tijeku...
+msgSyncError:
+  description: Message shown when sync failed.
+  message: Pogreška pri sinkronizaciji!
+msgNamespaceConflict:
+  description: >-
+    Message shown when namespace of the new script conflicts with an existent
+    one.
+  message: Script namespace conflicts! Molimo modificirajte @name i @namespace.
+msgInvalidScript:
+  description: Message shown when script is invalid.
+  message: Skripta ne valja!
+labelShowBadge:
+  description: Option to show number of running scripts on the badge.
+  message: Na bedžu [znački] prikaži broj skripti koje rade
+labelLineNumber:
+  description: Label for line number jumper.
+  message: 'Linija br.: '
+labelBlacklist:
+  description: Label for global blacklist settings in security section.
+  message: Crna Lista
+descBlacklist:
+  description: HTML Description for the global blacklist.
+  message: Link koji se slaže s onim u ovoj listi neće biti ubačen u skripte.
+buttonSaveBlacklist:
+  description: Button to save global blacklist.
+  message: Sačuvaj
+msgSavedBlacklist:
+  description: Message shown when blacklist are saved.
+  message: Crna Lista obnovljena.
+labelGeneral:
+  description: Label for general settings.
+  message: Generalni
+labelSyncScriptStatus:
+  description: Label for option to sync script status.
+  message: Sync script status
+labelSyncDisabled:
+  description: Label for option to disable sync service.
+  message: Nijedan
+labelSyncService:
+  description: Label for sync service select.
+  message: Sinkroniziraj na
+labelSyncAuthorize:
+  description: Label for button to authorize a service.
+  message: Autoriziraj
+labelSyncRevoke:
+  description: Label for button to revoke authorization for a service.
+  message: Odbij
+labelSyncAuthorizing:
+  description: Label for button when authorization is in progress.
+  message: Autoriziram
+msgSavedCustomCSS:
+  description: Message shown when custom CSS is saved.
+  message: Prilagođeni stil je obnovljen.
+labelCustomCSS:
+  description: Label for custom CSS section.
+  message: Prilagođeni stil
+descCustomCSS:
+  description: Description of custom CSS section.
+  message: >-
+    Prilagođeni CSS za opcije stranice i stranicu instalacija skripte. Ako niste
+    sigurni za što je ovo, ne dirajte.
+buttonSaveCustomCSS:
+  description: Label for button to save custom CSS.
+  message: Sačuvaj
+menuDashboard:
+  description: Label for menu item to open dashboard.
+  message: Otvori Dashboard
+menuMatchedScripts:
+  description: Label for menu listing matched scripts.
+  message: Matched skripte
+buttonOK:
+  description: OK button on dialog.
+  message: OK
+buttonCancel:
+  description: Cancel button on dialog.
+  message: Otkaži
+labelImportSettings:
+  description: Label for option to import settings from zip file.
+  message: Uvezi postavke
+learnBlacklist:
+  description: Refers to a link to introduce blacklist patterns.
+  message: Nauči više o blacklist uzorcima.
+editNavCode:
+  description: Label of code tab in script editor.
+  message: Kod
+editNavSettings:
+  description: Label of settings tab in script editor.
+  message: Postavke
+editLabelSettings:
+  description: Settings section in settings tab of script editor.
+  message: Postavke skripte
+editLabelMeta:
+  description: Metadata section in settings tab of script editor.
+  message: Prilagođeni metadata podaci
+labelKeepOriginal:
+  description: Option to keep the original match or ignore rules.
+  message: Sačuvaj original
+titleScriptUpdated:
+  description: Notification title for script updates.
+  message: Obnovi
+msgScriptUpdated:
+  description: Notification message for script updates.
+  message: 'Skripta [$1] je obnovljena!'
+labelNotifyUpdates:
+  description: Option to show notification when script is updated.
+  message: Javi kad je skripta obnovljena
+installFrom:
+  description: Label for button to install script from a userscript site.
+  message: Instaliraj sa $1
+labelSearchScript:
+  description: Placeholder for script search box.
+  message: Traži skripte...
+labelNoSearchScripts:
+  description: Message shown when no script is found in search results.
+  message: Nijedna skripta nije nađena.

+ 1 - 1
src/_locales/pl/messages.yml

@@ -108,7 +108,7 @@ labelAutoUpdate:
   message: Automatycznie sprawdzaj aktualizacje dla skryptów każdego dnia
   message: Automatycznie sprawdzaj aktualizacje dla skryptów każdego dnia
 labelIgnoreGrant:
 labelIgnoreGrant:
   description: Option to suppress no @grant warnings.
   description: Option to suppress no @grant warnings.
-  message: Pomijaj ostzeżenia dla skryptów, które nie mają linii @grant
+  message: 'Pomijaj ostzeżenia dla skryptów, które nie mają linii @grant'
   touched: false
   touched: false
 labelDataImport:
 labelDataImport:
   description: Section title of data import.
   description: Section title of data import.

+ 6 - 6
src/background/sync/base.js

@@ -348,8 +348,8 @@ export const BaseService = serviceFactory({
           delRemote.push(item);
           delRemote.push(item);
         }
         }
       });
       });
-      const promiseQueue = [].concat(
-        getRemote.map(item => {
+      const promiseQueue = [
+        ...getRemote.map(item => {
           this.log('Download script:', item.uri);
           this.log('Download script:', item.uri);
           return this.get(getFilename(item.uri))
           return this.get(getFilename(item.uri))
           .then(raw => {
           .then(raw => {
@@ -374,7 +374,7 @@ export const BaseService = serviceFactory({
             .then(res => { browser.runtime.sendMessage(res); });
             .then(res => { browser.runtime.sendMessage(res); });
           });
           });
         }),
         }),
-        putRemote.map(item => {
+        ...putRemote.map(item => {
           this.log('Upload script:', item.uri);
           this.log('Upload script:', item.uri);
           const data = JSON.stringify({
           const data = JSON.stringify({
             version: 1,
             version: 1,
@@ -392,17 +392,17 @@ export const BaseService = serviceFactory({
           remoteChanged = true;
           remoteChanged = true;
           return this.put(getFilename(item.uri), data);
           return this.put(getFilename(item.uri), data);
         }),
         }),
-        delRemote.map(item => {
+        ...delRemote.map(item => {
           this.log('Remove remote script:', item.uri);
           this.log('Remove remote script:', item.uri);
           delete remoteMeta.info[item.uri];
           delete remoteMeta.info[item.uri];
           remoteChanged = true;
           remoteChanged = true;
           return this.remove(getFilename(item.uri));
           return this.remove(getFilename(item.uri));
         }),
         }),
-        delLocal.map(item => {
+        ...delLocal.map(item => {
           this.log('Remove local script:', item.uri);
           this.log('Remove local script:', item.uri);
           return removeScript(item.id);
           return removeScript(item.id);
         }),
         }),
-      );
+      ];
       promiseQueue.push(Promise.all(promiseQueue).then(() => checkPosition()).then(changed => {
       promiseQueue.push(Promise.all(promiseQueue).then(() => checkPosition()).then(changed => {
         if (!changed) return;
         if (!changed) return;
         remoteChanged = true;
         remoteChanged = true;

+ 1 - 0
src/common/index.js

@@ -174,6 +174,7 @@ export function request(url, options = {}) {
     return Object.assign({
     return Object.assign({
       url,
       url,
       data,
       data,
+      xhr,
     }, extra);
     }, extra);
   }
   }
 }
 }

+ 1 - 1
src/common/ui/code.vue

@@ -96,7 +96,7 @@ export default {
   methods: {
   methods: {
     onReady(cm) {
     onReady(cm) {
       this.cm = cm;
       this.cm = cm;
-      if (this.readonly != null) cm.setOption('readOnly', true);
+      if (this.readonly) cm.setOption('readOnly', true);
       cm.state.commands = this.commands;
       cm.state.commands = this.commands;
       cm.setOption('extraKeys', {
       cm.setOption('extraKeys', {
         Esc: 'cancel',
         Esc: 'cancel',

+ 10 - 1
src/common/ui/style/style.css

@@ -10,6 +10,14 @@ html {
 
 
 body {
 body {
   font-size: 1rem;
   font-size: 1rem;
+}
+
+body,
+// Form elements will not inherit
+button,
+select,
+input,
+textarea {
   font-family: "PingFang SC", STHeiti, "Microsoft YaHei", sans-serif;
   font-family: "PingFang SC", STHeiti, "Microsoft YaHei", sans-serif;
 }
 }
 
 
@@ -51,7 +59,8 @@ code {
   height: 1rem;
   height: 1rem;
 }
 }
 
 
-svg path {
+// Firefox does not support `svg path` selector
+svg {
   fill: currentColor;
   fill: currentColor;
 }
 }
 
 

+ 5 - 1
src/manifest.json

@@ -1,5 +1,5 @@
 {
 {
-  "name": "Violentmonkey",
+  "name": "__MSG_extName__",
   "version": "__VERSION__",
   "version": "__VERSION__",
   "manifest_version": 2,
   "manifest_version": 2,
   "description": "__MSG_extDescription__",
   "description": "__MSG_extDescription__",
@@ -23,6 +23,10 @@
     "page": "background/index.html"
     "page": "background/index.html"
   },
   },
   "options_page": "options/index.html",
   "options_page": "options/index.html",
+  "options_ui": {
+    "page": "options/index.html",
+    "open_in_tab": true
+  },
   "content_scripts": [
   "content_scripts": [
     {
     {
       "js": [
       "js": [

+ 7 - 7
src/options/views/script-item.vue

@@ -27,17 +27,17 @@
           <icon :name="`toggle-${script.enabled ? 'on' : 'off'}`"></icon>
           <icon :name="`toggle-${script.enabled ? 'on' : 'off'}`"></icon>
         </span>
         </span>
       </tooltip>
       </tooltip>
-      <tooltip :title="i18n('buttonRemove')">
-        <span class="btn-ghost" @click="onRemove">
-          <icon name="trash"></icon>
-        </span>
-      </tooltip>
       <tooltip v-if="canUpdate" :title="i18n('buttonUpdate')">
       <tooltip v-if="canUpdate" :title="i18n('buttonUpdate')">
         <span class="btn-ghost" :disabled="script.checking" @click="onUpdate">
         <span class="btn-ghost" :disabled="script.checking" @click="onUpdate">
           <icon name="refresh"></icon>
           <icon name="refresh"></icon>
         </span>
         </span>
       </tooltip>
       </tooltip>
-      <span class="flex-auto" v-text="script.message"></span>
+      <div class="flex-auto" v-text="script.message"></div>
+      <tooltip :title="i18n('buttonRemove')">
+        <span class="btn-ghost" @click="onRemove">
+          <icon name="trash"></icon>
+        </span>
+      </tooltip>
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
@@ -295,7 +295,7 @@ export default {
     align-items: center;
     align-items: center;
     line-height: 1;
     line-height: 1;
     > .flex-auto {
     > .flex-auto {
-      text-align: right;
+      margin-left: 1rem;
     }
     }
   }
   }
   &-info {
   &-info {

+ 4 - 0
src/popup/style.css

@@ -21,8 +21,12 @@ body {
     padding: 0 3rem;
     padding: 0 3rem;
     cursor: pointer;
     cursor: pointer;
     text-align: center;
     text-align: center;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    overflow: hidden;
     .submenu > & {
     .submenu > & {
       text-align: left;
       text-align: left;
+      padding-left: 1rem;
     }
     }
     &.disabled {
     &.disabled {
       color: gray;
       color: gray;