Fix: newStyleFormat -> newStyleInUsercss

This commit is contained in:
eight 2017-10-09 00:52:05 +08:00
parent 2f3c477d96
commit cd00c20fa4
4 changed files with 9 additions and 12 deletions

View File

@ -971,11 +971,8 @@
"optionsAdvancedContextDelete": { "optionsAdvancedContextDelete": {
"message": "Add 'Delete' in editor context menu" "message": "Add 'Delete' in editor context menu"
}, },
"optionsAdvancedNewStyleFormat": { "optionsAdvancedNewStyleInUsercss": {
"message": "Format of newly created userstyle" "message": "Write new style as usercss"
},
"optionsAdvancedNewStyleFormatRegular": {
"message": "Regular"
}, },
"optionsActions": { "optionsActions": {
"message": "Actions" "message": "Actions"

View File

@ -1280,7 +1280,7 @@ function isUsercss(style) {
if (style.usercssData) { if (style.usercssData) {
return true; return true;
} }
if (!style.id && prefs.get('newStyleFormat') === 'usercss') { if (!style.id && prefs.get('newStyleInUsercss')) {
return true; return true;
} }
return false; return false;

View File

@ -9,7 +9,7 @@ var prefs = new function Prefs() {
'show-badge': true, // display text on popup menu icon 'show-badge': true, // display text on popup menu icon
'disableAll': false, // boss key 'disableAll': false, // boss key
'exposeIframes': false, // Add 'stylus-iframe' attribute to HTML element in all iframes 'exposeIframes': false, // Add 'stylus-iframe' attribute to HTML element in all iframes
'newStyleFormat': 'regular', // 'regular' or 'usercss', the format of userstyle when creating a new style. 'newStyleInUsercss': false, // create new style in usercss format
'popup.breadcrumbs': true, // display 'New style' links as URL breadcrumbs 'popup.breadcrumbs': true, // display 'New style' links as URL breadcrumbs
'popup.breadcrumbs.usePath': false, // use URL path for 'this URL' 'popup.breadcrumbs.usePath': false, // use URL path for 'this URL'

View File

@ -123,11 +123,11 @@
</span> </span>
</label> </label>
<label> <label>
<span i18n-text="optionsAdvancedNewStyleFormat"></span> <span i18n-text="optionsAdvancedNewStyleInUsercss"></span>
<select id="newStyleFormat"> <span class="onoffswitch">
<option value="regular" i18n-text="optionsAdvancedNewStyleFormatRegular"></option> <input type="checkbox" id="newStyleInUsercss">
<option value="usercss">Usercss</option> <span></span>
</select> </span>
</label> </label>
</div> </div>
</div> </div>