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": {
"message": "Add 'Delete' in editor context menu"
},
"optionsAdvancedNewStyleFormat": {
"message": "Format of newly created userstyle"
},
"optionsAdvancedNewStyleFormatRegular": {
"message": "Regular"
"optionsAdvancedNewStyleInUsercss": {
"message": "Write new style as usercss"
},
"optionsActions": {
"message": "Actions"

View File

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

View File

@ -9,7 +9,7 @@ var prefs = new function Prefs() {
'show-badge': true, // display text on popup menu icon
'disableAll': false, // boss key
'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.usePath': false, // use URL path for 'this URL'

View File

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