add "[x] only Usercss" filter in the manager

This commit is contained in:
tophf 2017-11-22 17:21:50 +03:00
parent 65f0a2ac3c
commit fe3b1511f6
3 changed files with 13 additions and 1 deletions

View File

@ -19,8 +19,10 @@ var prefs = new function Prefs() {
'manage.onlyEnabled': false, // display only enabled styles 'manage.onlyEnabled': false, // display only enabled styles
'manage.onlyLocal': false, // display only styles created locally 'manage.onlyLocal': false, // display only styles created locally
'manage.onlyUsercss': false, // display only usercss styles
'manage.onlyEnabled.invert': false, // display only disabled styles 'manage.onlyEnabled.invert': false, // display only disabled styles
'manage.onlyLocal.invert': false, // display only externally installed styles 'manage.onlyLocal.invert': false, // display only externally installed styles
'manage.onlyUsercss.invert': false, // display only non-usercss (standard) styles
'manage.newUI': true, // use the new compact layout 'manage.newUI': true, // use the new compact layout
'manage.newUI.favicons': false, // show favicons for the sites in applies-to 'manage.newUI.favicons': false, // show favicons for the sites in applies-to
'manage.newUI.faviconsGray': true, // gray out favicons 'manage.newUI.faviconsGray': true, // gray out favicons

View File

@ -180,6 +180,15 @@
<option i18n-text="manageOnlyExternal" value="true"></option> <option i18n-text="manageOnlyExternal" value="true"></option>
</select> </select>
</label> </label>
<label>
<input id="manage.onlyUsercss" type="checkbox"
data-filter=".usercss"
data-filter-hide=":not(.usercss)">
<select id="manage.onlyUsercss.invert">
<option i18n-text="manageOnlyUsercss" value="false"></option>
<option i18n-text="manageOnlyNonUsercss" value="true"></option>
</select>
</label>
<label id="onlyUpdates" class="hidden"> <label id="onlyUpdates" class="hidden">
<input type="checkbox" <input type="checkbox"
data-filter=".can-update, .update-problem, .update-done" data-filter=".can-update, .update-problem, .update-done"

View File

@ -185,7 +185,8 @@ function createStyleElement({style, name}) {
entry.styleMeta = getStyleWithNoCode(style); entry.styleMeta = getStyleWithNoCode(style);
entry.className = parts.entryClassBase + ' ' + entry.className = parts.entryClassBase + ' ' +
(style.enabled ? 'enabled' : 'disabled') + (style.enabled ? 'enabled' : 'disabled') +
(style.updateUrl ? ' updatable' : ''); (style.updateUrl ? ' updatable' : '') +
(style.usercssData ? ' usercss' : '');
if (style.url) { if (style.url) {
$('.homepage', entry).appendChild(parts.homepageIcon.cloneNode(true)); $('.homepage', entry).appendChild(parts.homepageIcon.cloneNode(true));