From 3741d4a80550fb3104da410c98a6799df70198e3 Mon Sep 17 00:00:00 2001 From: overdodactyl Date: Fri, 30 Nov 2018 18:26:31 -0700 Subject: [PATCH] bookmarks popup fix #136 --- css/userChrome-files/bookmarks_popup.css | 20 ++++++++++++++- no_empty_iframes/no_empty_iframes.zip | Bin 0 -> 1550 bytes no_empty_iframes/testpage.html | 0 userChrome.css | 20 ++++++++++++++- website/no_empty_iframes/README.md | 24 ------------------ website/no_empty_iframes/manifest.json | 17 ------------- website/no_empty_iframes/no_empty_iframes.js | 12 --------- website/no_empty_iframes/no_empty_iframes.zip | Bin 1504 -> 0 bytes website/no_empty_iframes/readme.html | 13 ---------- 9 files changed, 38 insertions(+), 68 deletions(-) create mode 100644 no_empty_iframes/no_empty_iframes.zip delete mode 100644 no_empty_iframes/testpage.html delete mode 100644 website/no_empty_iframes/README.md delete mode 100644 website/no_empty_iframes/manifest.json delete mode 100644 website/no_empty_iframes/no_empty_iframes.js delete mode 100644 website/no_empty_iframes/no_empty_iframes.zip delete mode 100644 website/no_empty_iframes/readme.html diff --git a/css/userChrome-files/bookmarks_popup.css b/css/userChrome-files/bookmarks_popup.css index eae2b2d..207f9dd 100644 --- a/css/userChrome-files/bookmarks_popup.css +++ b/css/userChrome-files/bookmarks_popup.css @@ -70,7 +70,22 @@ url(chrome://browser/content/places/bookmarkProperties2.xul) { #bookmarkproperties { -moz-appearance: none!important; color: var(--in-content-page-color)!important; - background-color: var(--in-content-box-background)!important + background-color: var(--in-content-category-header-background)!important + } + textbox { + -moz-appearance: none!important; + min-height: 20px!important; + padding: 2px!important; + border: 1px solid var(--in-content-box-border-color); + color: var(--in-content-page-color)!important; + background: var(--in-content-box-background)!important + } + #editBMPanel_folderTree { + background: var(--in-content-box-background)!important + } + #editBMPanel_folderMenuList { + background-color: var(--in-content-box-background)!important; + padding: 2px!important } #editBMPanel_foldersExpander.expander-down, #editBMPanel_tagsSelectorExpander.expander-down { @@ -99,4 +114,7 @@ url(chrome://browser/content/places/bookmarkProperties2.xul) { border-radius: 3px; border-color: var(--in-content-box-border-color)!important } + #editBMPanel_newFolderBox { + background: 0 0!important + } } \ No newline at end of file diff --git a/no_empty_iframes/no_empty_iframes.zip b/no_empty_iframes/no_empty_iframes.zip new file mode 100644 index 0000000000000000000000000000000000000000..0c4ec722293932691d9b5e15dc2104c6a2116559 GIT binary patch literal 1550 zcmWIWW@Zs#W?_3~M>IfjXW!H0!`fs=uOA;{Iy#n)9YH)U$@!Mw{30=DJ* zlLGimf|3@?HM20e1nP6FoN5uWLhiP3^~tK^w_=ZTcGRaI>yui#Jx-{)?AzJu{CVOZ z=0426zFhf6?t#8VhTW_-0X`p?rH!5yR=s=r^Lpv*AbIo3bJbj?*CUoLJ}ou-*1|J7 z&%f(lv$^+4@%tYau3sfgwO&k%Bu;bwOYi2)X_{4f&zr5GRM$Sh>Wj5T)^2?T!v*%` zDy$iW{z0s>^u$%KA6J_F@^#^pgWTr?P6qZwPU{V-U0u#uwauvmB{moE9MjV5(`*1Ea^#RHfg&_XQx7XSNV)Uvw){U|Q+3kYZ?y?) zqPm2>?p|Bx_{NjPKmK~E|GMpgZ|6)hT<+25<$jmz9ZOBY*DJcar>JPp2*^I-%{y<| zQ~LmT5`5@a=evPlqT@F(=`CesVBiJPxruq1X{p5}dRfK!d9eYu`G*w*?*7&GJ2NrR z$}My$-`g9i$)b@*Vwgk=IL>9R)%d@+;r1@B!@S?`?d4w=%dTMZ%<$%kX-zj8E3Qd} zFnpPqe&HLF&jGfF9#w2sqB;K<-)d_1?_|H>Z)o*JBEm8tDtJYB^FsmD~9dDouY@GJD=M5gIlhd=4=e6hbg;NI4=VJ+^>yaN5F zcFt0=?>zi$`iG4P-+$HKT))Jm)v?fbede5+;*_ZoCWqFZalU?cS3V+?o&iJY!d$(V z|AC>?0}Lf$Af1;VpPE}xQW>9_R+N~VS_}*=-wAvDju;5EWPcJ_ZSwq%qI|8#;eMBc z{>4J9iwr)hMV^dw@6=z;ad-D-H9MEYn^Na%Hh-(*&W};%S>~G2k@>2C>3Oee-ulH! z2QAod@Fy~6xm`YOJ3}LSc8a&LfPaeMw%>15Bk8^!yZYI2{;qE_OCHq9eh7+n+i$}=MdR1$+pfaKeg5s!(^stG`t*lsZ&%0^L-~w< z_BFPPIA=Tym;TxB8@R61ewid&O7;DTo3#`tJ)d*5^jsZ7fHxzPJu|MNO$8WcAfV8& zq!C2J3py?a1rVQskwJoiLG=68vmI9$8@B!W2%=$pWTP>YEV9wfz_Ju20iziIy)Yle wcqkv)c+9v)Hhv|r;Kma3D3;tvFGaBg$`9~nWdr$>83^TpiRdP<#Ajdt0Qzl?00000 literal 0 HcmV?d00001 diff --git a/no_empty_iframes/testpage.html b/no_empty_iframes/testpage.html deleted file mode 100644 index e69de29..0000000 diff --git a/userChrome.css b/userChrome.css index 8aef864..fce13f8 100644 --- a/userChrome.css +++ b/userChrome.css @@ -692,7 +692,22 @@ url(chrome://browser/content/places/bookmarkProperties2.xul) { #bookmarkproperties { -moz-appearance: none!important; color: var(--in-content-page-color)!important; - background-color: var(--in-content-box-background)!important + background-color: var(--in-content-category-header-background)!important + } + textbox { + -moz-appearance: none!important; + min-height: 20px!important; + padding: 2px!important; + border: 1px solid var(--in-content-box-border-color); + color: var(--in-content-page-color)!important; + background: var(--in-content-box-background)!important + } + #editBMPanel_folderTree { + background: var(--in-content-box-background)!important + } + #editBMPanel_folderMenuList { + background-color: var(--in-content-box-background)!important; + padding: 2px!important } #editBMPanel_foldersExpander.expander-down, #editBMPanel_tagsSelectorExpander.expander-down { @@ -721,6 +736,9 @@ url(chrome://browser/content/places/bookmarkProperties2.xul) { border-radius: 3px; border-color: var(--in-content-box-border-color)!important } + #editBMPanel_newFolderBox { + background: 0 0!important + } } @-moz-document url("chrome://global/content/commonDialog.xul") { #commonDialog { diff --git a/website/no_empty_iframes/README.md b/website/no_empty_iframes/README.md deleted file mode 100644 index c80b6e9..0000000 --- a/website/no_empty_iframes/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# No Empty iframes - -## What it does - -No Empty iframes adds a blank `div` to any iframes that have an empty `body`. - -## That sounds useless...what's the point? - -[ShadowFox](https://github.com/overdodactyl/ShadowFox) utilizes `userContent.css` and `userChrome.css` to create a universal dark theme for Firefox. In part, this means styling `about:blank`. A complication of this is that `about:blank` is also used for anonymous frames on webpages. Generally, iframes will contain content, making the following css rule specific enough: - -```css -html > body:empty { - background-color: var(--in-content-page-background)!important; - margin: 0!important -} -``` - -Some pages, however, have empty iframes that cause readability issues (see [#222](https://github.com/overdodactyl/ShadowFox/issues/222)). - -This extension injects an empty div into such iframes, allowing the rule above to work. - -## Better approaches? - -If anyone has a better approach/workaround for this problem, I would appreciate any suggestions. \ No newline at end of file diff --git a/website/no_empty_iframes/manifest.json b/website/no_empty_iframes/manifest.json deleted file mode 100644 index 13ee691..0000000 --- a/website/no_empty_iframes/manifest.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - - "description": "Add an empty div to the body of any empty iframes. Supplemental addon to ShadowFox.", - "manifest_version": 2, - "name": "No Empty iframes", - "version": "1.0", - "homepage_url": "https://github.com/overdodactyl/ShadowFox/no_empty_iframes", - - "content_scripts": [ - { - "matches": [""], - "js": ["no_empty_iframes.js"], - "run_at": "document_end" - } - ] - -} diff --git a/website/no_empty_iframes/no_empty_iframes.js b/website/no_empty_iframes/no_empty_iframes.js deleted file mode 100644 index 05a29b0..0000000 --- a/website/no_empty_iframes/no_empty_iframes.js +++ /dev/null @@ -1,12 +0,0 @@ -/* Once page finishes loading, find all empty iframes - * and add empty div inside */ -window.onload = function() { - var frames = document.getElementsByTagName("iframe"); - for (var i = 0; i < frames.length; i++) { - var doc = frames[i].contentWindow.document; - if (doc.body.innerHTML === "") { - var elemDiv = document.createElement('div'); - doc.body.appendChild(elemDiv); - } - } -} diff --git a/website/no_empty_iframes/no_empty_iframes.zip b/website/no_empty_iframes/no_empty_iframes.zip deleted file mode 100644 index 31feefdd2ed3507ab20de95e40be6732593af06e..0000000000000000000000000000000000000000 GIT binary pat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^+Kb;_4&nKk2>n0vv! zh)2)N{B$IqGwilIEr)=&*Z&Qz)PW-X{|r9>>Ik$gzm>G?*Bb?v22lW zlw|I9A*EaYr*MeBT=a8MerzS5(1)EOHtynq`qP@hV1&S6Tja`Ir?aaf$x3g+sCKP3Dr)zI%m?4xs&VzycwD7nQ;|X zD!@Pk0fmMojUXCcba62#fcU_`m0)0~>bvFAa)q%W{NxumAkEPF^DBstY&2$CMK(GH zSURGlTomIcADiVwzNo Empty iframes -

What it does

-

No Empty iframes adds a blank div to any iframes that have an empty body.

-

That sounds useless…what’s the point?

-

ShadowFox utilizes userContent.css and userChrome.css to create a universal dark theme for Firefox. In part, this means styling about:blank. A complication of this is that about:blank is also used for anonymous frames on webpages. Generally, iframes will contain content, making the following css rule specific enough:

- -

Some pages, however, have empty iframes that cause readability issues (see #222).

-

This extension injects an empty div into such iframes, allowing the rule above to work.

-

Better approaches?

-

If anyone has a better approach/workaround for this problem, I would appreciate any suggestions.