File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -31,20 +31,12 @@ async function restoreOptions(tab) {
3131 storage . customOptions . forEach ( ( element ) => {
3232 if ( matchRuleShort ( url , element . url ) ) { // Compare custom setting's hostname with the tab's
3333 injected = true ;
34- if ( element . shadowActivated ) { // If the settings has text shadow activated
35- css = '::selection { background: ' + element . background + ' !important; color: ' + element . color + ' !important; text-shadow: ' + element . shadowColor + ' 0px 0px ' + element . shadowBlur + 'px !important}' ;
36- } else {
37- css = '::selection { background: ' + element . background + ' !important; color: ' + element . color + ' !important; text-shadow: none !important}' ;
38- }
34+ css = '::selection { background: ' + element . background + ' !important; color: ' + element . color + ( ( element . shadowActivated ) ? ' !important; text-shadow: ' + element . shadowColor + ' 0px 0px ' + element . shadowBlur + 'px !important' : '' ) + '}' ;
3935 }
4036 } ) ;
4137 }
4238 if ( ! injected && storage . witness ) { // If url didn't match any custom settings and the user already defined some settings (avoid injecting undefined values into CSS)
43- if ( storage . shadowActivated ) { // If the settings has text shadow activated
44- css = '::selection { background: ' + storage . background_color + ' !important; color: ' + storage . color + ' !important; text-shadow: ' + storage . shadowColor + ' 0px 0px ' + storage . shadowBlur + 'px !important}' ;
45- } else {
46- css = '::selection { background: ' + storage . background_color + ' !important; color: ' + storage . color + ' !important; text-shadow: none !important}' ;
47- }
39+ css = '::selection { background: ' + storage . background_color + ' !important; color: ' + storage . color + ( ( storage . shadowActivated ) ? ' !important; text-shadow: ' + storage . shadowColor + ' 0px 0px ' + storage . shadowBlur + 'px !important' : '' ) + '}' ;
4840 }
4941 browser . scripting . insertCSS ( {
5042 target : {
You can’t perform that action at this time.
0 commit comments