Browse Source

feat: manage script values

close #360
Gerald 7 years ago
parent
commit
4679ca1d21

+ 21 - 0
src/_locales/cs/messages.yml

@@ -116,6 +116,15 @@ editNavCode:
 editNavSettings:
   description: Label of settings tab in script editor.
   message: ''
+editNavValues:
+  description: Label of values tab in script editor.
+  message: ''
+editValueCancel:
+  description: Button to cancel modification of a script value.
+  message: ''
+editValueSave:
+  description: Button to save modification of a script value.
+  message: ''
 extDescription:
   description: Description for this extension.
   message: ''
@@ -197,6 +206,9 @@ labelDonate:
 labelDownloadURL:
   description: Label of script @downloadURL in custom meta data.
   message: 'Stažení (URL):'
+labelEditValue:
+  description: Label shown in the panel to edit a script value.
+  message: ''
 labelExclude:
   description: Label of @exclude rules.
   message: Výjimky
@@ -434,6 +446,9 @@ msgUpdated:
 msgUpdating:
   description: Message shown when a new version of script is being fetched.
   message: Aktualizuji...
+noValues:
+  description: Label shown when there is no value for current script.
+  message: ''
 optionShowEnabledFirst:
   description: Option to show enabled scripts first in alphabetical order.
   message: ''
@@ -455,6 +470,12 @@ sideMenuSettings:
 titleScriptUpdated:
   description: Notification title for script updates.
   message: ''
+valueLabelKey:
+  description: Label for key of a script value.
+  message: ''
+valueLabelValue:
+  description: Label for value of a script value.
+  message: ''
 warnScriptLongLines:
   description: Warning message shown when script has lines that are too long to be edited.
   message: ''

+ 21 - 0
src/_locales/de/messages.yml

@@ -118,6 +118,15 @@ editNavCode:
 editNavSettings:
   description: Label of settings tab in script editor.
   message: Einstellungen
+editNavValues:
+  description: Label of values tab in script editor.
+  message: ''
+editValueCancel:
+  description: Button to cancel modification of a script value.
+  message: ''
+editValueSave:
+  description: Button to save modification of a script value.
+  message: ''
 extDescription:
   description: Description for this extension.
   message: Benutzerskript-Unterstützung für Browser.
@@ -199,6 +208,9 @@ labelDonate:
 labelDownloadURL:
   description: Label of script @downloadURL in custom meta data.
   message: 'Download URL:'
+labelEditValue:
+  description: Label shown in the panel to edit a script value.
+  message: ''
 labelExclude:
   description: Label of @exclude rules.
   message: Ausschließen (@exclude)
@@ -436,6 +448,9 @@ msgUpdated:
 msgUpdating:
   description: Message shown when a new version of script is being fetched.
   message: Aktualisiere...
+noValues:
+  description: Label shown when there is no value for current script.
+  message: ''
 optionShowEnabledFirst:
   description: Option to show enabled scripts first in alphabetical order.
   message: Aktivierte Skripte zuerst anzeigen
@@ -457,6 +472,12 @@ sideMenuSettings:
 titleScriptUpdated:
   description: Notification title for script updates.
   message: Aktualisierung
+valueLabelKey:
+  description: Label for key of a script value.
+  message: ''
+valueLabelValue:
+  description: Label for value of a script value.
+  message: ''
 warnScriptLongLines:
   description: Warning message shown when script has lines that are too long to be edited.
   message: ''

+ 21 - 0
src/_locales/el/messages.yml

@@ -118,6 +118,15 @@ editNavCode:
 editNavSettings:
   description: Label of settings tab in script editor.
   message: Ρυθμίσεις
+editNavValues:
+  description: Label of values tab in script editor.
+  message: ''
+editValueCancel:
+  description: Button to cancel modification of a script value.
+  message: ''
+editValueSave:
+  description: Button to save modification of a script value.
+  message: ''
 extDescription:
   description: Description for this extension.
   message: Προσφέρει υποστήριξη για σενάρια χρηστών για τους φυλλομετρητές.
@@ -203,6 +212,9 @@ labelDonate:
 labelDownloadURL:
   description: Label of script @downloadURL in custom meta data.
   message: 'URL Λήψης:'
+labelEditValue:
+  description: Label shown in the panel to edit a script value.
+  message: ''
 labelExclude:
   description: Label of @exclude rules.
   message: Κανόνες @exclude
@@ -442,6 +454,9 @@ msgUpdated:
 msgUpdating:
   description: Message shown when a new version of script is being fetched.
   message: Ενημέρωση...
+noValues:
+  description: Label shown when there is no value for current script.
+  message: ''
 optionShowEnabledFirst:
   description: Option to show enabled scripts first in alphabetical order.
   message: Εμφάνιση των ενεργοποιημένων σεναρίων πρώτα
@@ -463,6 +478,12 @@ sideMenuSettings:
 titleScriptUpdated:
   description: Notification title for script updates.
   message: Ενημέρωση
+valueLabelKey:
+  description: Label for key of a script value.
+  message: ''
+valueLabelValue:
+  description: Label for value of a script value.
+  message: ''
 warnScriptLongLines:
   description: Warning message shown when script has lines that are too long to be edited.
   message: ''

+ 21 - 0
src/_locales/en/messages.yml

@@ -116,6 +116,15 @@ editNavCode:
 editNavSettings:
   description: Label of settings tab in script editor.
   message: Settings
+editNavValues:
+  description: Label of values tab in script editor.
+  message: Values
+editValueCancel:
+  description: Button to cancel modification of a script value.
+  message: Cancel
+editValueSave:
+  description: Button to save modification of a script value.
+  message: Save
 extDescription:
   description: Description for this extension.
   message: Provide userscript support for browsers.
@@ -197,6 +206,9 @@ labelDonate:
 labelDownloadURL:
   description: Label of script @downloadURL in custom meta data.
   message: 'Download URL:'
+labelEditValue:
+  description: Label shown in the panel to edit a script value.
+  message: Editing script value
 labelExclude:
   description: Label of @exclude rules.
   message: '@exclude rules'
@@ -434,6 +446,9 @@ msgUpdated:
 msgUpdating:
   description: Message shown when a new version of script is being fetched.
   message: Updating...
+noValues:
+  description: Label shown when there is no value for current script.
+  message: No value is stored
 optionShowEnabledFirst:
   description: Option to show enabled scripts first in alphabetical order.
   message: Show enabled scripts first
@@ -455,6 +470,12 @@ sideMenuSettings:
 titleScriptUpdated:
   description: Notification title for script updates.
   message: Update
+valueLabelKey:
+  description: Label for key of a script value.
+  message: Key (string)
+valueLabelValue:
+  description: Label for value of a script value.
+  message: Value (serialized as JSON)
 warnScriptLongLines:
   description: Warning message shown when script has lines that are too long to be edited.
   message: >-

+ 21 - 0
src/_locales/es/messages.yml

@@ -116,6 +116,15 @@ editNavCode:
 editNavSettings:
   description: Label of settings tab in script editor.
   message: Ajustes
+editNavValues:
+  description: Label of values tab in script editor.
+  message: ''
+editValueCancel:
+  description: Button to cancel modification of a script value.
+  message: ''
+editValueSave:
+  description: Button to save modification of a script value.
+  message: ''
 extDescription:
   description: Description for this extension.
   message: Proporciona soporte de scripts para navegadores
@@ -201,6 +210,9 @@ labelDonate:
 labelDownloadURL:
   description: Label of script @downloadURL in custom meta data.
   message: '@downloadURL:'
+labelEditValue:
+  description: Label shown in the panel to edit a script value.
+  message: ''
 labelExclude:
   description: Label of @exclude rules.
   message: '@exclude:'
@@ -438,6 +450,9 @@ msgUpdated:
 msgUpdating:
   description: Message shown when a new version of script is being fetched.
   message: Actualizando...
+noValues:
+  description: Label shown when there is no value for current script.
+  message: ''
 optionShowEnabledFirst:
   description: Option to show enabled scripts first in alphabetical order.
   message: ''
@@ -459,6 +474,12 @@ sideMenuSettings:
 titleScriptUpdated:
   description: Notification title for script updates.
   message: Actualizar
+valueLabelKey:
+  description: Label for key of a script value.
+  message: ''
+valueLabelValue:
+  description: Label for value of a script value.
+  message: ''
 warnScriptLongLines:
   description: Warning message shown when script has lines that are too long to be edited.
   message: ''

+ 21 - 0
src/_locales/fi/messages.yml

@@ -116,6 +116,15 @@ editNavCode:
 editNavSettings:
   description: Label of settings tab in script editor.
   message: Asetukset
+editNavValues:
+  description: Label of values tab in script editor.
+  message: ''
+editValueCancel:
+  description: Button to cancel modification of a script value.
+  message: ''
+editValueSave:
+  description: Button to save modification of a script value.
+  message: ''
 extDescription:
   description: Description for this extension.
   message: Tarjoaa selaimiin tuen käyttäjäskripteille.
@@ -197,6 +206,9 @@ labelDonate:
 labelDownloadURL:
   description: Label of script @downloadURL in custom meta data.
   message: 'Latausosoite:'
+labelEditValue:
+  description: Label shown in the panel to edit a script value.
+  message: ''
 labelExclude:
   description: Label of @exclude rules.
   message: '@exclude-säännöt'
@@ -436,6 +448,9 @@ msgUpdated:
 msgUpdating:
   description: Message shown when a new version of script is being fetched.
   message: Päivitetään...
+noValues:
+  description: Label shown when there is no value for current script.
+  message: ''
 optionShowEnabledFirst:
   description: Option to show enabled scripts first in alphabetical order.
   message: Näytä käytössä olevat skriptit ensin
@@ -457,6 +472,12 @@ sideMenuSettings:
 titleScriptUpdated:
   description: Notification title for script updates.
   message: Päivitys
+valueLabelKey:
+  description: Label for key of a script value.
+  message: ''
+valueLabelValue:
+  description: Label for value of a script value.
+  message: ''
 warnScriptLongLines:
   description: Warning message shown when script has lines that are too long to be edited.
   message: ''

+ 21 - 0
src/_locales/fr/messages.yml

@@ -117,6 +117,15 @@ editNavCode:
 editNavSettings:
   description: Label of settings tab in script editor.
   message: Configuration
+editNavValues:
+  description: Label of values tab in script editor.
+  message: ''
+editValueCancel:
+  description: Button to cancel modification of a script value.
+  message: ''
+editValueSave:
+  description: Button to save modification of a script value.
+  message: ''
 extDescription:
   description: Description for this extension.
   message: Apporte un support userscript pour les navigateurs
@@ -200,6 +209,9 @@ labelDonate:
 labelDownloadURL:
   description: Label of script @downloadURL in custom meta data.
   message: 'URL de téléchargement:'
+labelEditValue:
+  description: Label shown in the panel to edit a script value.
+  message: ''
 labelExclude:
   description: Label of @exclude rules.
   message: Règles @exclude
@@ -437,6 +449,9 @@ msgUpdated:
 msgUpdating:
   description: Message shown when a new version of script is being fetched.
   message: Mise à jour...
+noValues:
+  description: Label shown when there is no value for current script.
+  message: ''
 optionShowEnabledFirst:
   description: Option to show enabled scripts first in alphabetical order.
   message: ''
@@ -458,6 +473,12 @@ sideMenuSettings:
 titleScriptUpdated:
   description: Notification title for script updates.
   message: Mise à jour
+valueLabelKey:
+  description: Label for key of a script value.
+  message: ''
+valueLabelValue:
+  description: Label for value of a script value.
+  message: ''
 warnScriptLongLines:
   description: Warning message shown when script has lines that are too long to be edited.
   message: ''

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

@@ -116,6 +116,15 @@ editNavCode:
 editNavSettings:
   description: Label of settings tab in script editor.
   message: Postavke
+editNavValues:
+  description: Label of values tab in script editor.
+  message: ''
+editValueCancel:
+  description: Button to cancel modification of a script value.
+  message: ''
+editValueSave:
+  description: Button to save modification of a script value.
+  message: ''
 extDescription:
   description: Description for this extension.
   message: Omogućava korištenje korisničkih skripti u web pregledniku.
@@ -197,6 +206,9 @@ labelDonate:
 labelDownloadURL:
   description: Label of script @downloadURL in custom meta data.
   message: 'Download URL:'
+labelEditValue:
+  description: Label shown in the panel to edit a script value.
+  message: ''
 labelExclude:
   description: Label of @exclude rules.
   message: '@exclude rules'
@@ -434,6 +446,9 @@ msgUpdated:
 msgUpdating:
   description: Message shown when a new version of script is being fetched.
   message: Obnavljam...
+noValues:
+  description: Label shown when there is no value for current script.
+  message: ''
 optionShowEnabledFirst:
   description: Option to show enabled scripts first in alphabetical order.
   message: ''
@@ -455,6 +470,12 @@ sideMenuSettings:
 titleScriptUpdated:
   description: Notification title for script updates.
   message: Obnovi
+valueLabelKey:
+  description: Label for key of a script value.
+  message: ''
+valueLabelValue:
+  description: Label for value of a script value.
+  message: ''
 warnScriptLongLines:
   description: Warning message shown when script has lines that are too long to be edited.
   message: ''

+ 21 - 0
src/_locales/id/messages.yml

@@ -116,6 +116,15 @@ editNavCode:
 editNavSettings:
   description: Label of settings tab in script editor.
   message: Pengaturan
+editNavValues:
+  description: Label of values tab in script editor.
+  message: ''
+editValueCancel:
+  description: Button to cancel modification of a script value.
+  message: ''
+editValueSave:
+  description: Button to save modification of a script value.
+  message: ''
 extDescription:
   description: Description for this extension.
   message: Menyediakan dukungan skrip pengguna untuk peramban.
@@ -199,6 +208,9 @@ labelDonate:
 labelDownloadURL:
   description: Label of script @downloadURL in custom meta data.
   message: 'URL Unduhan:'
+labelEditValue:
+  description: Label shown in the panel to edit a script value.
+  message: ''
 labelExclude:
   description: Label of @exclude rules.
   message: Pengecualian
@@ -436,6 +448,9 @@ msgUpdated:
 msgUpdating:
   description: Message shown when a new version of script is being fetched.
   message: Memperbarui...
+noValues:
+  description: Label shown when there is no value for current script.
+  message: ''
 optionShowEnabledFirst:
   description: Option to show enabled scripts first in alphabetical order.
   message: ''
@@ -457,6 +472,12 @@ sideMenuSettings:
 titleScriptUpdated:
   description: Notification title for script updates.
   message: Update
+valueLabelKey:
+  description: Label for key of a script value.
+  message: ''
+valueLabelValue:
+  description: Label for value of a script value.
+  message: ''
 warnScriptLongLines:
   description: Warning message shown when script has lines that are too long to be edited.
   message: ''

+ 21 - 0
src/_locales/it/messages.yml

@@ -116,6 +116,15 @@ editNavCode:
 editNavSettings:
   description: Label of settings tab in script editor.
   message: Impostazioni
+editNavValues:
+  description: Label of values tab in script editor.
+  message: ''
+editValueCancel:
+  description: Button to cancel modification of a script value.
+  message: ''
+editValueSave:
+  description: Button to save modification of a script value.
+  message: ''
 extDescription:
   description: Description for this extension.
   message: Introduce il supporto agli userscript per browser.
@@ -197,6 +206,9 @@ labelDonate:
 labelDownloadURL:
   description: Label of script @downloadURL in custom meta data.
   message: 'URL Download:'
+labelEditValue:
+  description: Label shown in the panel to edit a script value.
+  message: ''
 labelExclude:
   description: Label of @exclude rules.
   message: '@exclude rules'
@@ -436,6 +448,9 @@ msgUpdated:
 msgUpdating:
   description: Message shown when a new version of script is being fetched.
   message: Aggiornando...
+noValues:
+  description: Label shown when there is no value for current script.
+  message: ''
 optionShowEnabledFirst:
   description: Option to show enabled scripts first in alphabetical order.
   message: Visualizza script abilitati per primi
@@ -457,6 +472,12 @@ sideMenuSettings:
 titleScriptUpdated:
   description: Notification title for script updates.
   message: Aggiornamento
+valueLabelKey:
+  description: Label for key of a script value.
+  message: ''
+valueLabelValue:
+  description: Label for value of a script value.
+  message: ''
 warnScriptLongLines:
   description: Warning message shown when script has lines that are too long to be edited.
   message: ''

+ 21 - 0
src/_locales/ja/messages.yml

@@ -117,6 +117,15 @@ editNavCode:
 editNavSettings:
   description: Label of settings tab in script editor.
   message: 設定
+editNavValues:
+  description: Label of values tab in script editor.
+  message: ''
+editValueCancel:
+  description: Button to cancel modification of a script value.
+  message: ''
+editValueSave:
+  description: Button to save modification of a script value.
+  message: ''
 extDescription:
   description: Description for this extension.
   message: ブラウザでユーザースクリプトを利用できるようにします。
@@ -198,6 +207,9 @@ labelDonate:
 labelDownloadURL:
   description: Label of script @downloadURL in custom meta data.
   message: '更新を取得するURL:'
+labelEditValue:
+  description: Label shown in the panel to edit a script value.
+  message: ''
 labelExclude:
   description: Label of @exclude rules.
   message: 除外するページのURL (@exclude)
@@ -435,6 +447,9 @@ msgUpdated:
 msgUpdating:
   description: Message shown when a new version of script is being fetched.
   message: 更新中…
+noValues:
+  description: Label shown when there is no value for current script.
+  message: ''
 optionShowEnabledFirst:
   description: Option to show enabled scripts first in alphabetical order.
   message: 有効にされたスクリプトを先に
@@ -456,6 +471,12 @@ sideMenuSettings:
 titleScriptUpdated:
   description: Notification title for script updates.
   message: 更新
+valueLabelKey:
+  description: Label for key of a script value.
+  message: ''
+valueLabelValue:
+  description: Label for value of a script value.
+  message: ''
 warnScriptLongLines:
   description: Warning message shown when script has lines that are too long to be edited.
   message: 一部の行が長すぎるため、読み取り専用モードで開きます。 外部エディタで編集してください。

+ 21 - 0
src/_locales/ko/messages.yml

@@ -114,6 +114,15 @@ editNavCode:
 editNavSettings:
   description: Label of settings tab in script editor.
   message: 설정
+editNavValues:
+  description: Label of values tab in script editor.
+  message: ''
+editValueCancel:
+  description: Button to cancel modification of a script value.
+  message: ''
+editValueSave:
+  description: Button to save modification of a script value.
+  message: ''
 extDescription:
   description: Description for this extension.
   message: 유저스크립트를 실행합니다.
@@ -195,6 +204,9 @@ labelDonate:
 labelDownloadURL:
   description: Label of script @downloadURL in custom meta data.
   message: 'D다운로드 URL:'
+labelEditValue:
+  description: Label shown in the panel to edit a script value.
+  message: ''
 labelExclude:
   description: Label of @exclude rules.
   message: '@exclude 규칙'
@@ -432,6 +444,9 @@ msgUpdated:
 msgUpdating:
   description: Message shown when a new version of script is being fetched.
   message: 업데이트중...
+noValues:
+  description: Label shown when there is no value for current script.
+  message: ''
 optionShowEnabledFirst:
   description: Option to show enabled scripts first in alphabetical order.
   message: 활성화된 스크립트 먼저 보여주기
@@ -453,6 +468,12 @@ sideMenuSettings:
 titleScriptUpdated:
   description: Notification title for script updates.
   message: 업데이트
+valueLabelKey:
+  description: Label for key of a script value.
+  message: ''
+valueLabelValue:
+  description: Label for value of a script value.
+  message: ''
 warnScriptLongLines:
   description: Warning message shown when script has lines that are too long to be edited.
   message: ''

+ 21 - 0
src/_locales/pl/messages.yml

@@ -119,6 +119,15 @@ editNavCode:
 editNavSettings:
   description: Label of settings tab in script editor.
   message: Ustawienia
+editNavValues:
+  description: Label of values tab in script editor.
+  message: ''
+editValueCancel:
+  description: Button to cancel modification of a script value.
+  message: ''
+editValueSave:
+  description: Button to save modification of a script value.
+  message: ''
 extDescription:
   description: Description for this extension.
   message: Zapewnia obsługę skryptów użytkownika dla przeglądarek.
@@ -202,6 +211,9 @@ labelDonate:
 labelDownloadURL:
   description: Label of script @downloadURL in custom meta data.
   message: 'Adres URL pobierania:'
+labelEditValue:
+  description: Label shown in the panel to edit a script value.
+  message: ''
 labelExclude:
   description: Label of @exclude rules.
   message: Reguły @exclude
@@ -439,6 +451,9 @@ msgUpdated:
 msgUpdating:
   description: Message shown when a new version of script is being fetched.
   message: Aktualizacja...
+noValues:
+  description: Label shown when there is no value for current script.
+  message: ''
 optionShowEnabledFirst:
   description: Option to show enabled scripts first in alphabetical order.
   message: Pokazuj najpierw włączone skrypty
@@ -460,6 +475,12 @@ sideMenuSettings:
 titleScriptUpdated:
   description: Notification title for script updates.
   message: Aktualizacja
+valueLabelKey:
+  description: Label for key of a script value.
+  message: ''
+valueLabelValue:
+  description: Label for value of a script value.
+  message: ''
 warnScriptLongLines:
   description: Warning message shown when script has lines that are too long to be edited.
   message: ''

+ 21 - 0
src/_locales/pt_BR/messages.yml

@@ -116,6 +116,15 @@ editNavCode:
 editNavSettings:
   description: Label of settings tab in script editor.
   message: Definições
+editNavValues:
+  description: Label of values tab in script editor.
+  message: ''
+editValueCancel:
+  description: Button to cancel modification of a script value.
+  message: ''
+editValueSave:
+  description: Button to save modification of a script value.
+  message: ''
 extDescription:
   description: Description for this extension.
   message: Fornece suporte a scripts de usuários para navegadores.
@@ -199,6 +208,9 @@ labelDonate:
 labelDownloadURL:
   description: Label of script @downloadURL in custom meta data.
   message: 'URL de download:'
+labelEditValue:
+  description: Label shown in the panel to edit a script value.
+  message: ''
 labelExclude:
   description: Label of @exclude rules.
   message: Regras @exclude
@@ -438,6 +450,9 @@ msgUpdated:
 msgUpdating:
   description: Message shown when a new version of script is being fetched.
   message: Atualizando...
+noValues:
+  description: Label shown when there is no value for current script.
+  message: ''
 optionShowEnabledFirst:
   description: Option to show enabled scripts first in alphabetical order.
   message: Mostrar scripts ativos primeiro
@@ -459,6 +474,12 @@ sideMenuSettings:
 titleScriptUpdated:
   description: Notification title for script updates.
   message: Atualização
+valueLabelKey:
+  description: Label for key of a script value.
+  message: ''
+valueLabelValue:
+  description: Label for value of a script value.
+  message: ''
 warnScriptLongLines:
   description: Warning message shown when script has lines that are too long to be edited.
   message: ''

+ 21 - 0
src/_locales/pt_PT/messages.yml

@@ -116,6 +116,15 @@ editNavCode:
 editNavSettings:
   description: Label of settings tab in script editor.
   message: Definições
+editNavValues:
+  description: Label of values tab in script editor.
+  message: ''
+editValueCancel:
+  description: Button to cancel modification of a script value.
+  message: ''
+editValueSave:
+  description: Button to save modification of a script value.
+  message: ''
 extDescription:
   description: Description for this extension.
   message: Fornece suporte a scripts de utilizador para navegadores.
@@ -199,6 +208,9 @@ labelDonate:
 labelDownloadURL:
   description: Label of script @downloadURL in custom meta data.
   message: 'URL de descarga:'
+labelEditValue:
+  description: Label shown in the panel to edit a script value.
+  message: ''
 labelExclude:
   description: Label of @exclude rules.
   message: Regras @exclude
@@ -438,6 +450,9 @@ msgUpdated:
 msgUpdating:
   description: Message shown when a new version of script is being fetched.
   message: A atualizar...
+noValues:
+  description: Label shown when there is no value for current script.
+  message: ''
 optionShowEnabledFirst:
   description: Option to show enabled scripts first in alphabetical order.
   message: Mostrar scripts ativos primeiro
@@ -459,6 +474,12 @@ sideMenuSettings:
 titleScriptUpdated:
   description: Notification title for script updates.
   message: Atualização
+valueLabelKey:
+  description: Label for key of a script value.
+  message: ''
+valueLabelValue:
+  description: Label for value of a script value.
+  message: ''
 warnScriptLongLines:
   description: Warning message shown when script has lines that are too long to be edited.
   message: ''

+ 21 - 0
src/_locales/ro/messages.yml

@@ -114,6 +114,15 @@ editNavCode:
 editNavSettings:
   description: Label of settings tab in script editor.
   message: ''
+editNavValues:
+  description: Label of values tab in script editor.
+  message: ''
+editValueCancel:
+  description: Button to cancel modification of a script value.
+  message: ''
+editValueSave:
+  description: Button to save modification of a script value.
+  message: ''
 extDescription:
   description: Description for this extension.
   message: ''
@@ -197,6 +206,9 @@ labelDonate:
 labelDownloadURL:
   description: Label of script @downloadURL in custom meta data.
   message: 'URL Descărcare:'
+labelEditValue:
+  description: Label shown in the panel to edit a script value.
+  message: ''
 labelExclude:
   description: Label of @exclude rules.
   message: Excluderi
@@ -434,6 +446,9 @@ msgUpdated:
 msgUpdating:
   description: Message shown when a new version of script is being fetched.
   message: Se actualizează...
+noValues:
+  description: Label shown when there is no value for current script.
+  message: ''
 optionShowEnabledFirst:
   description: Option to show enabled scripts first in alphabetical order.
   message: ''
@@ -455,6 +470,12 @@ sideMenuSettings:
 titleScriptUpdated:
   description: Notification title for script updates.
   message: ''
+valueLabelKey:
+  description: Label for key of a script value.
+  message: ''
+valueLabelValue:
+  description: Label for value of a script value.
+  message: ''
 warnScriptLongLines:
   description: Warning message shown when script has lines that are too long to be edited.
   message: ''

+ 21 - 0
src/_locales/ru/messages.yml

@@ -121,6 +121,15 @@ editNavCode:
 editNavSettings:
   description: Label of settings tab in script editor.
   message: Настройки
+editNavValues:
+  description: Label of values tab in script editor.
+  message: ''
+editValueCancel:
+  description: Button to cancel modification of a script value.
+  message: ''
+editValueSave:
+  description: Button to save modification of a script value.
+  message: ''
 extDescription:
   description: Description for this extension.
   message: >-
@@ -204,6 +213,9 @@ labelDonate:
 labelDownloadURL:
   description: Label of script @downloadURL in custom meta data.
   message: 'Источник загрузки:'
+labelEditValue:
+  description: Label shown in the panel to edit a script value.
+  message: ''
 labelExclude:
   description: Label of @exclude rules.
   message: 'Не задействовать на (правила исключений @exclude):'
@@ -441,6 +453,9 @@ msgUpdated:
 msgUpdating:
   description: Message shown when a new version of script is being fetched.
   message: Обновление...
+noValues:
+  description: Label shown when there is no value for current script.
+  message: ''
 optionShowEnabledFirst:
   description: Option to show enabled scripts first in alphabetical order.
   message: Показывать включенные скрипты первыми
@@ -462,6 +477,12 @@ sideMenuSettings:
 titleScriptUpdated:
   description: Notification title for script updates.
   message: Обновление
+valueLabelKey:
+  description: Label for key of a script value.
+  message: ''
+valueLabelValue:
+  description: Label for value of a script value.
+  message: ''
 warnScriptLongLines:
   description: Warning message shown when script has lines that are too long to be edited.
   message: ''

+ 21 - 0
src/_locales/sr/messages.yml

@@ -114,6 +114,15 @@ editNavCode:
 editNavSettings:
   description: Label of settings tab in script editor.
   message: ''
+editNavValues:
+  description: Label of values tab in script editor.
+  message: ''
+editValueCancel:
+  description: Button to cancel modification of a script value.
+  message: ''
+editValueSave:
+  description: Button to save modification of a script value.
+  message: ''
 extDescription:
   description: Description for this extension.
   message: ''
@@ -197,6 +206,9 @@ labelDonate:
 labelDownloadURL:
   description: Label of script @downloadURL in custom meta data.
   message: 'Адреса преузимања:'
+labelEditValue:
+  description: Label shown in the panel to edit a script value.
+  message: ''
 labelExclude:
   description: Label of @exclude rules.
   message: Правила изузимања
@@ -434,6 +446,9 @@ msgUpdated:
 msgUpdating:
   description: Message shown when a new version of script is being fetched.
   message: Ажурирање...
+noValues:
+  description: Label shown when there is no value for current script.
+  message: ''
 optionShowEnabledFirst:
   description: Option to show enabled scripts first in alphabetical order.
   message: ''
@@ -455,6 +470,12 @@ sideMenuSettings:
 titleScriptUpdated:
   description: Notification title for script updates.
   message: ''
+valueLabelKey:
+  description: Label for key of a script value.
+  message: ''
+valueLabelValue:
+  description: Label for value of a script value.
+  message: ''
 warnScriptLongLines:
   description: Warning message shown when script has lines that are too long to be edited.
   message: ''

+ 21 - 0
src/_locales/tr/messages.yml

@@ -116,6 +116,15 @@ editNavCode:
 editNavSettings:
   description: Label of settings tab in script editor.
   message: Ayarlar
+editNavValues:
+  description: Label of values tab in script editor.
+  message: ''
+editValueCancel:
+  description: Button to cancel modification of a script value.
+  message: ''
+editValueSave:
+  description: Button to save modification of a script value.
+  message: ''
 extDescription:
   description: Description for this extension.
   message: Tarayıcılar için userscript desteği sağlar.
@@ -199,6 +208,9 @@ labelDonate:
 labelDownloadURL:
   description: Label of script @downloadURL in custom meta data.
   message: 'İndirme URL:'
+labelEditValue:
+  description: Label shown in the panel to edit a script value.
+  message: ''
 labelExclude:
   description: Label of @exclude rules.
   message: '@exclude kuralları'
@@ -438,6 +450,9 @@ msgUpdated:
 msgUpdating:
   description: Message shown when a new version of script is being fetched.
   message: Güncelleniyor...
+noValues:
+  description: Label shown when there is no value for current script.
+  message: ''
 optionShowEnabledFirst:
   description: Option to show enabled scripts first in alphabetical order.
   message: ''
@@ -459,6 +474,12 @@ sideMenuSettings:
 titleScriptUpdated:
   description: Notification title for script updates.
   message: Güncelleme
+valueLabelKey:
+  description: Label for key of a script value.
+  message: ''
+valueLabelValue:
+  description: Label for value of a script value.
+  message: ''
 warnScriptLongLines:
   description: Warning message shown when script has lines that are too long to be edited.
   message: ''

+ 21 - 0
src/_locales/uk/messages.yml

@@ -118,6 +118,15 @@ editNavCode:
 editNavSettings:
   description: Label of settings tab in script editor.
   message: Налаштування
+editNavValues:
+  description: Label of values tab in script editor.
+  message: ''
+editValueCancel:
+  description: Button to cancel modification of a script value.
+  message: ''
+editValueSave:
+  description: Button to save modification of a script value.
+  message: ''
 extDescription:
   description: Description for this extension.
   message: >-
@@ -201,6 +210,9 @@ labelDonate:
 labelDownloadURL:
   description: Label of script @downloadURL in custom meta data.
   message: 'Джерело завантаження:'
+labelEditValue:
+  description: Label shown in the panel to edit a script value.
+  message: ''
 labelExclude:
   description: Label of @exclude rules.
   message: 'Не застосовувати на (правила виключень @exclude):'
@@ -438,6 +450,9 @@ msgUpdated:
 msgUpdating:
   description: Message shown when a new version of script is being fetched.
   message: Оновлення...
+noValues:
+  description: Label shown when there is no value for current script.
+  message: ''
 optionShowEnabledFirst:
   description: Option to show enabled scripts first in alphabetical order.
   message: Показувати ввімкнені скрипти першими
@@ -459,6 +474,12 @@ sideMenuSettings:
 titleScriptUpdated:
   description: Notification title for script updates.
   message: Оновлення
+valueLabelKey:
+  description: Label for key of a script value.
+  message: ''
+valueLabelValue:
+  description: Label for value of a script value.
+  message: ''
 warnScriptLongLines:
   description: Warning message shown when script has lines that are too long to be edited.
   message: ''

+ 21 - 0
src/_locales/vi/messages.yml

@@ -116,6 +116,15 @@ editNavCode:
 editNavSettings:
   description: Label of settings tab in script editor.
   message: Cài đặt
+editNavValues:
+  description: Label of values tab in script editor.
+  message: ''
+editValueCancel:
+  description: Button to cancel modification of a script value.
+  message: ''
+editValueSave:
+  description: Button to save modification of a script value.
+  message: ''
 extDescription:
   description: Description for this extension.
   message: Hỗ trợ chạy userscript trên trình duyệt.
@@ -197,6 +206,9 @@ labelDonate:
 labelDownloadURL:
   description: Label of script @downloadURL in custom meta data.
   message: 'URL tải về:'
+labelEditValue:
+  description: Label shown in the panel to edit a script value.
+  message: ''
 labelExclude:
   description: Label of @exclude rules.
   message: Bỏ qua
@@ -434,6 +446,9 @@ msgUpdated:
 msgUpdating:
   description: Message shown when a new version of script is being fetched.
   message: Đang cập nhật...
+noValues:
+  description: Label shown when there is no value for current script.
+  message: ''
 optionShowEnabledFirst:
   description: Option to show enabled scripts first in alphabetical order.
   message: Hiển thị script được bật trước
@@ -455,6 +470,12 @@ sideMenuSettings:
 titleScriptUpdated:
   description: Notification title for script updates.
   message: Cập nhật
+valueLabelKey:
+  description: Label for key of a script value.
+  message: ''
+valueLabelValue:
+  description: Label for value of a script value.
+  message: ''
 warnScriptLongLines:
   description: Warning message shown when script has lines that are too long to be edited.
   message: ''

+ 21 - 0
src/_locales/zh_CN/messages.yml

@@ -114,6 +114,15 @@ editNavCode:
 editNavSettings:
   description: Label of settings tab in script editor.
   message: 设置
+editNavValues:
+  description: Label of values tab in script editor.
+  message: 数据
+editValueCancel:
+  description: Button to cancel modification of a script value.
+  message: 取消
+editValueSave:
+  description: Button to save modification of a script value.
+  message: 保存
 extDescription:
   description: Description for this extension.
   message: 为浏览器提供用户脚本支持。
@@ -195,6 +204,9 @@ labelDonate:
 labelDownloadURL:
   description: Label of script @downloadURL in custom meta data.
   message: 下载更新地址:
+labelEditValue:
+  description: Label shown in the panel to edit a script value.
+  message: 编辑数据
 labelExclude:
   description: Label of @exclude rules.
   message: '@exclude 规则'
@@ -432,6 +444,9 @@ msgUpdated:
 msgUpdating:
   description: Message shown when a new version of script is being fetched.
   message: 正在更新...
+noValues:
+  description: Label shown when there is no value for current script.
+  message: 没有存储数据
 optionShowEnabledFirst:
   description: Option to show enabled scripts first in alphabetical order.
   message: 先显示被启用的脚本
@@ -453,6 +468,12 @@ sideMenuSettings:
 titleScriptUpdated:
   description: Notification title for script updates.
   message: 更新
+valueLabelKey:
+  description: Label for key of a script value.
+  message: 键名(字符串)
+valueLabelValue:
+  description: Label for value of a script value.
+  message: 键值(作为JSON序列化)
 warnScriptLongLines:
   description: Warning message shown when script has lines that are too long to be edited.
   message: 某些行超长,以只读模式打开。请使用外部编辑器编辑。

+ 21 - 0
src/_locales/zh_TW/messages.yml

@@ -114,6 +114,15 @@ editNavCode:
 editNavSettings:
   description: Label of settings tab in script editor.
   message: 設定
+editNavValues:
+  description: Label of values tab in script editor.
+  message: ''
+editValueCancel:
+  description: Button to cancel modification of a script value.
+  message: ''
+editValueSave:
+  description: Button to save modification of a script value.
+  message: ''
 extDescription:
   description: Description for this extension.
   message: 為瀏覽器提供使用者腳本支援。
@@ -195,6 +204,9 @@ labelDonate:
 labelDownloadURL:
   description: Label of script @downloadURL in custom meta data.
   message: 下載更新網址:
+labelEditValue:
+  description: Label shown in the panel to edit a script value.
+  message: ''
 labelExclude:
   description: Label of @exclude rules.
   message: '@exclude 規則'
@@ -432,6 +444,9 @@ msgUpdated:
 msgUpdating:
   description: Message shown when a new version of script is being fetched.
   message: 正在更新…
+noValues:
+  description: Label shown when there is no value for current script.
+  message: ''
 optionShowEnabledFirst:
   description: Option to show enabled scripts first in alphabetical order.
   message: ''
@@ -453,6 +468,12 @@ sideMenuSettings:
 titleScriptUpdated:
   description: Notification title for script updates.
   message: 更新
+valueLabelKey:
+  description: Label for key of a script value.
+  message: ''
+valueLabelValue:
+  description: Label for value of a script value.
+  message: ''
 warnScriptLongLines:
   description: Warning message shown when script has lines that are too long to be edited.
   message: ''

+ 4 - 1
src/background/app.js

@@ -16,7 +16,7 @@ import {
   getScripts, removeScript, getData, checkRemove, getScriptsByURL,
   updateScriptInfo, getExportData, getScriptCode,
   getScriptByIds, moveScript, vacuum, parseScript, getScript,
-  sortScripts,
+  sortScripts, getValueStoresByIds,
 } from './utils/db';
 import { resetBlacklist } from './utils/tester';
 import { setValueStore, updateValueStore, resetValueOpener, addValueOpener } from './utils/values';
@@ -108,6 +108,9 @@ const commands = {
       });
     });
   },
+  GetValueStore(id) {
+    return getValueStoresByIds([id]).then(res => res[id] || {});
+  },
   SetValueStore({ where, valueStore }) {
     // Value store will be replaced soon.
     return setValueStore(where, valueStore);

+ 3 - 0
src/common/ui/style/style.css

@@ -112,6 +112,9 @@ button {
   .flex-col > & {
     height: 0;
   }
+  :not(.flex-col) > & {
+    width: 0;
+  }
 }
 .pos-rel {
   position: relative;

+ 12 - 1
src/options/views/edit/index.vue

@@ -6,6 +6,7 @@
         <div class="edit-nav">
           <div class="edit-nav-item" v-text="i18n('editNavCode')" :class="{active: nav === 'code'}" @click="nav = 'code'"></div>
           <div class="edit-nav-item" v-text="i18n('editNavSettings')" :class="{active: nav === 'settings'}" @click="nav = 'settings'"></div>
+          <div class="edit-nav-item" v-text="i18n('editNavValues')" :class="{active: nav === 'values'}" @click="nav = 'values'"></div>
         </div>
       </div>
       <div class="text-right">
@@ -22,9 +23,12 @@
         v-model="code" :commands="commands" @warnLarge="onWarnLarge"
       />
       <vm-settings
-        v-show="nav === 'settings'" class="abs-full"
+        v-show="nav === 'settings'" class="abs-full edit-body"
         :value="script" :settings="settings"
       />
+      <vm-values
+        :show="nav === 'values'" class="abs-full edit-body" :script="script"
+      />
     </div>
   </div>
 </template>
@@ -35,6 +39,7 @@ import { objectGet } from 'src/common/object';
 import VmCode from 'src/common/ui/code';
 import { showMessage } from '../../utils';
 import VmSettings from './settings';
+import VmValues from './values';
 
 function fromList(list) {
   return (list || []).join('\n');
@@ -50,6 +55,7 @@ export default {
   components: {
     VmCode,
     VmSettings,
+    VmValues,
   },
   data() {
     return {
@@ -208,6 +214,11 @@ export default {
       padding: 8px;
     }
   }
+  &-body {
+    padding: 8px 16px;
+    overflow: auto;
+    background: white;
+  }
   &-nav {
     position: absolute;
     left: 0;

+ 19 - 22
src/options/views/edit/settings.vue

@@ -118,31 +118,28 @@ export default {
 
 <style>
 .edit-settings {
-  padding: 8px 16px;
-  overflow: auto;
-  background: white;
   h4 {
     margin: 2em 0 1em;
   }
-}
-.form-group {
-  position: relative;
-  max-width: 600px;
-  margin-bottom: .5em;
-  &.vl-tooltip {
-    display: block;
-  }
-  input[type=text] {
-    width: 100%;
-  }
-  > * {
-    flex: 1;
-  }
-  > .label {
-    flex: 0 0 8em;
-  }
-  > textarea {
-    min-height: 5em;
+  .form-group {
+    position: relative;
+    max-width: 600px;
+    margin-bottom: .5em;
+    &.vl-tooltip {
+      display: block;
+    }
+    input[type=text] {
+      width: 100%;
+    }
+    > * {
+      flex: 1;
+    }
+    > .label {
+      flex: 0 0 8em;
+    }
+    > textarea {
+      min-height: 5em;
+    }
   }
 }
 </style>

+ 227 - 0
src/options/views/edit/values.vue

@@ -0,0 +1,227 @@
+<template>
+  <div class="edit-values" v-show="show">
+    <div class="mb-1">
+      <button @click="onNew">+</button>
+      <div class="inline-block ml-2" v-if="totalPages > 1">
+        <button :disabled="!hasPrevious" @click="page -= 1">&larr;</button>
+        <span class="mx-1" v-text="page"></span>
+        <button :disabled="!hasNext" @click="page += 1">&rarr;</button>
+      </div>
+    </div>
+    <div class="edit-values-table" v-if="keys">
+      <div class="edit-values-empty" v-if="!keys.length">
+        <div v-text="i18n('noValues')"></div>
+      </div>
+      <div class="edit-values-row flex" v-for="key in currentPage" @click="onEdit(key)">
+        <div class="ellipsis">
+          <span v-text="key"></span>
+          <div class="edit-values-btn">
+            <span @click.stop="onRemove(key)">
+              <icon name="trash" />
+            </span>
+          </div>
+        </div>
+        <div class="ellipsis flex-auto" v-text="getValue(key, true)"></div>
+      </div>
+    </div>
+    <div class="edit-values-panel flex flex-col" v-if="current">
+      <div class="flex mb-1">
+        <h4 class="flex-auto" v-text="i18n('labelEditValue')"></h4>
+        <div>
+          <button v-text="i18n('editValueSave')" @click="onSave"></button>
+          <button v-text="i18n('editValueCancel')" @click="onCancel"></button>
+        </div>
+      </div>
+      <label class="mb-1" v-text="i18n('valueLabelKey')"></label>
+      <input v-model="current.key" :readOnly="!current.isNew">
+      <label class="mt-1 mb-1" v-text="i18n('valueLabelValue')"></label>
+      <textarea class="flex-auto" v-model="current.value"></textarea>
+    </div>
+  </div>
+</template>
+
+<script>
+import { sendMessage } from 'src/common';
+import Icon from 'src/common/ui/icon';
+
+const PAGE_SIZE = 25;
+const MAX_LENGTH = 1024;
+
+export default {
+  props: ['show', 'script'],
+  components: {
+    Icon,
+  },
+  data() {
+    return {
+      page: 1,
+      current: null,
+      keys: null,
+      values: null,
+    };
+  },
+  computed: {
+    totalPages() {
+      if (!this.keys) return 0;
+      return Math.floor(this.keys.length / PAGE_SIZE) + 1;
+    },
+    currentPage() {
+      if (!this.keys) return null;
+      this.page = Math.max(1, Math.min(this.page, this.totalPages));
+      const offset = PAGE_SIZE * (this.page - 1);
+      return this.keys.slice(offset, offset + PAGE_SIZE);
+    },
+    hasPrevious() {
+      return this.page > 1;
+    },
+    hasNext() {
+      return this.page < this.totalPages;
+    },
+  },
+  watch: {
+    show(show) {
+      if (show && !this.keys) this.refresh();
+    },
+  },
+  methods: {
+    getValue(key, sliced) {
+      let value = this.values[key];
+      const type = value[0];
+      value = value.slice(1);
+      if (type === 's') value = JSON.stringify(value);
+      if (sliced && value.length > MAX_LENGTH) {
+        value = value.slice(0, MAX_LENGTH);
+      }
+      return value;
+    },
+    refresh() {
+      sendMessage({ cmd: 'GetValueStore', data: this.script.props.id })
+      .then(values => {
+        this.values = values;
+        this.keys = Object.keys(values).sort();
+      });
+    },
+    updateValue({ key, value, isNew }) {
+      const rawValue = value ? `o${value}` : '';
+      return sendMessage({
+        cmd: 'UpdateValue',
+        data: {
+          id: this.script.props.id,
+          update: {
+            key,
+            value: rawValue,
+          },
+        },
+      })
+      .then(() => {
+        if (value) {
+          this.values[key] = rawValue;
+          if (isNew) this.keys.push(key);
+        } else {
+          const i = this.keys.indexOf(key);
+          if (i >= 0) this.keys.splice(i, 1);
+          delete this.values[key];
+        }
+      });
+    },
+    onNew() {
+      this.current = {
+        isNew: true,
+        key: '',
+        value: '',
+      };
+    },
+    onRemove(key) {
+      this.updateValue({ key })
+      .then(() => {
+        if (this.current && this.current.key === key) {
+          this.current = null;
+        }
+      });
+    },
+    onEdit(key) {
+      this.current = {
+        isNew: false,
+        key,
+        value: this.getValue(key),
+      };
+    },
+    onSave() {
+      this.updateValue(this.current)
+      .then(() => {
+        this.current = null;
+      });
+    },
+    onCancel() {
+      this.current = null;
+    },
+  },
+  created() {
+    let unwatch;
+    const init = () => {
+      if (this.show) {
+        this.refresh();
+        if (unwatch) unwatch();
+      }
+    };
+    unwatch = this.$watch('show', init);
+    init();
+  },
+};
+</script>
+
+<style>
+.edit-values {
+  &-row {
+    border: 1px solid #ddd;
+    &:not(:first-child) {
+      border-top: 0;
+    }
+    > * {
+      font-size: 12px;
+      padding: 4px 6px;
+      &:first-child {
+        position: relative;
+        width: 30%;
+        max-width: 240px;
+      }
+      &:not(:first-child) {
+        border-left: 1px solid #ddd;
+      }
+    }
+    :not(:hover) .edit-values-btn {
+      display: none;
+    }
+  }
+  &-empty {
+    color: #888;
+  }
+  &-panel {
+    position: absolute;
+    top: 0;
+    right: 0;
+    width: 50%;
+    height: 100%;
+    padding: 8px;
+    box-shadow: -5px 0 5px #ddd;
+    background: white;
+    z-index: 10;
+    input {
+      width: 100%;
+    }
+    textarea {
+      width: 100%;
+      word-break: break-all;
+      resize: none;
+    }
+  }
+  &-btn {
+    position: absolute;
+    top: 0;
+    right: 0;
+    padding: 4px;
+    background: white;
+    box-shadow: -5px 0 5px white;
+  }
+}
+</style>