Fix: remove unused messages

This commit is contained in:
eight 2018-10-14 17:17:20 +08:00
parent 14c2fdbb58
commit a39405ac4c
2 changed files with 1 additions and 16 deletions

View File

@ -1159,10 +1159,6 @@
"message": "Code", "message": "Code",
"description": "Label for the code for a section" "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": { "sectionRemove": {
"message": "Remove section", "message": "Remove section",
"description": "Label for the button to remove a section" "description": "Label for the button to remove a section"
@ -1329,10 +1325,6 @@
"message": "Save", "message": "Save",
"description": "Label for save button for style editing" "description": "Label for save button for style editing"
}, },
"styleSectionsTitle": {
"message": "Sections",
"description": "Title for the style sections section"
},
"styleToMozillaFormatHelp": { "styleToMozillaFormatHelp": {
"message": "The Mozilla format of the code can be submitted to userstyles.org and used with the classic Stylish for Firefox", "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" "description": "Help info for the Mozilla format header section that converts the code to/from Mozilla format"

View File

@ -15,7 +15,7 @@ function createSectionsEditor(style) {
const sections = []; const sections = [];
const nameEl = $('#name'); const nameEl = $('#name');
nameEl.addEventListener('change', () => { nameEl.addEventListener('input', () => {
dirty.modify('name', style.name, nameEl.value); dirty.modify('name', style.name, nameEl.value);
style.name = nameEl.value; style.name = nameEl.value;
}); });
@ -31,8 +31,6 @@ function createSectionsEditor(style) {
$('#to-mozilla-help').addEventListener('click', showToMozillaHelp); $('#to-mozilla-help').addEventListener('click', showToMozillaHelp);
$('#from-mozilla').addEventListener('click', () => showMozillaFormatImport()); $('#from-mozilla').addEventListener('click', () => showMozillaFormatImport());
$('#save-button').addEventListener('click', saveStyle); $('#save-button').addEventListener('click', saveStyle);
// FIXME: this element doesn't exist?
$('#sections-help').addEventListener('click', showSectionHelp);
document.addEventListener('wheel', scrollEntirePageOnCtrlShift); document.addEventListener('wheel', scrollEntirePageOnCtrlShift);
@ -105,11 +103,6 @@ function createSectionsEditor(style) {
showHelp(t('styleMozillaFormatHeading'), t('styleToMozillaFormatHelp')); showHelp(t('styleMozillaFormatHeading'), t('styleToMozillaFormatHelp'));
} }
function showSectionHelp(event) {
event.preventDefault();
showHelp(t('styleSectionsTitle'), t('sectionHelp'));
}
function getSearchableInputs(cm) { function getSearchableInputs(cm) {
return sections.find(s => s.cm === cm).appliesTo.map(a => a.valueEl).filter(Boolean); return sections.find(s => s.cm === cm).appliesTo.map(a => a.valueEl).filter(Boolean);
} }