mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-07 03:12:33 +01:00
Minor code review
This commit is contained in:
parent
90be78d7a2
commit
d364eb9668
@ -52,7 +52,7 @@ hr {
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
}
|
||||
#basicTools {
|
||||
#stickyTools {
|
||||
align-items: stretch;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
@ -41,26 +41,22 @@ CodeMirror.defineMode('raw-settings', function() {
|
||||
return {
|
||||
token: function(stream) {
|
||||
if ( stream.sol() ) {
|
||||
const match = stream.match(/\s*\S+/);
|
||||
if ( match !== null ) {
|
||||
lastSetting = match[0].trim();
|
||||
if ( defaultSettings.has(lastSetting) ) {
|
||||
stream.eatSpace();
|
||||
const match = stream.match(/\S+/);
|
||||
if ( match !== null && defaultSettings.has(match[0]) ) {
|
||||
lastSetting = match[0];
|
||||
return 'keyword';
|
||||
}
|
||||
}
|
||||
lastSetting = '';
|
||||
stream.skipToEnd();
|
||||
return 'error';
|
||||
return 'line-cm-error';
|
||||
}
|
||||
if ( lastSetting !== '' ) {
|
||||
stream.eatSpace();
|
||||
const match = stream.match(/\S+.*$/);
|
||||
if ( match !== null ) {
|
||||
if ( match[0] !== defaultSettings.get(lastSetting) ) {
|
||||
return 'strong';
|
||||
}
|
||||
}
|
||||
lastSetting = '';
|
||||
const match = stream.match(/.*$/);
|
||||
if (
|
||||
match !== null &&
|
||||
match[0].trim() !== defaultSettings.get(lastSetting)
|
||||
) {
|
||||
return 'line-cm-strong';
|
||||
}
|
||||
stream.skipToEnd();
|
||||
return null;
|
||||
|
@ -14,7 +14,7 @@
|
||||
<body class="loading">
|
||||
<div id="panes">
|
||||
<div id="sticky">
|
||||
<div id="basicTools">
|
||||
<div id="stickyTools">
|
||||
<div class="rulesetTools">
|
||||
<span id="saveRules" class="fa-icon" data-i18n-title="popupTipSaveRules">lock</span>
|
||||
<span id="revertRules" class="fa-icon" data-i18n-title="popupTipRevertRules">eraser</span>
|
||||
@ -44,7 +44,7 @@
|
||||
<span id="no-scripting" class="hnSwitch tool enabled" role="button" aria-label tabindex="0" title><span class="fa-icon fa-icon-badged">code<svg class="nope" viewBox="0 0 20 20"><path d="M1,1 19,19M1,19 19,1" /></svg></span><span class="caption" data-i18n="popupNoScripting_v2"></span></span>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="toolRibbon">
|
||||
<div id="basicTools" class="toolRibbon">
|
||||
<span id="gotoZap" class="fa-icon tool" data-i18n-title="popupTipZapper">bolt<span class="caption" data-i18n="popupTipZapper"></span></span>
|
||||
<span id="gotoPick" class="fa-icon tool" data-i18n-title="popupTipPicker">eye-dropper<span class="caption" data-i18n="popupTipPicker"></span></span>
|
||||
<a href="logger-ui.html#_" class="fa-icon tool enabled" target="uBOLogger" tabindex="0" data-i18n-title="popupTipLog">list-alt<span class="caption" data-i18n="popupTipLog"></span></a>
|
||||
|
Loading…
Reference in New Issue
Block a user