From a39405ac4c32d5d38f4b70abd2ea54929d51eae2 Mon Sep 17 00:00:00 2001 From: eight Date: Sun, 14 Oct 2018 17:17:20 +0800 Subject: [PATCH] Fix: remove unused messages --- _locales/en/messages.json | 8 -------- edit/sections-editor.js | 9 +-------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 8fbf088e..62a3d4fd 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1159,10 +1159,6 @@ "message": "Code", "description": "Label for the code for a section" }, - "sectionHelp": { - "message": "Sections let you define different pieces of code to apply to different sets of URLs in the same style. For example, a single style could change the homepage of a site one way, while changing the rest of a site another way.", - "description": "Help text for sections" - }, "sectionRemove": { "message": "Remove section", "description": "Label for the button to remove a section" @@ -1329,10 +1325,6 @@ "message": "Save", "description": "Label for save button for style editing" }, - "styleSectionsTitle": { - "message": "Sections", - "description": "Title for the style sections section" - }, "styleToMozillaFormatHelp": { "message": "The Mozilla format of the code can be submitted to userstyles.org and used with the classic Stylish for Firefox", "description": "Help info for the Mozilla format header section that converts the code to/from Mozilla format" diff --git a/edit/sections-editor.js b/edit/sections-editor.js index 96df2e83..8ce4d7c7 100644 --- a/edit/sections-editor.js +++ b/edit/sections-editor.js @@ -15,7 +15,7 @@ function createSectionsEditor(style) { const sections = []; const nameEl = $('#name'); - nameEl.addEventListener('change', () => { + nameEl.addEventListener('input', () => { dirty.modify('name', style.name, nameEl.value); style.name = nameEl.value; }); @@ -31,8 +31,6 @@ function createSectionsEditor(style) { $('#to-mozilla-help').addEventListener('click', showToMozillaHelp); $('#from-mozilla').addEventListener('click', () => showMozillaFormatImport()); $('#save-button').addEventListener('click', saveStyle); - // FIXME: this element doesn't exist? - $('#sections-help').addEventListener('click', showSectionHelp); document.addEventListener('wheel', scrollEntirePageOnCtrlShift); @@ -105,11 +103,6 @@ function createSectionsEditor(style) { showHelp(t('styleMozillaFormatHeading'), t('styleToMozillaFormatHelp')); } - function showSectionHelp(event) { - event.preventDefault(); - showHelp(t('styleSectionsTitle'), t('sectionHelp')); - } - function getSearchableInputs(cm) { return sections.find(s => s.cm === cm).appliesTo.map(a => a.valueEl).filter(Boolean); }