popup.css 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714
  1. /*******************************************************************************
  2. ηMatrix - a browser extension to black/white list requests.
  3. Copyright (C) 2019-2022 Alessio Vanni
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see {http://www.gnu.org/licenses/}.
  14. Home: https://gitlab.com/vannilla/ematrix
  15. uMatrix Home: https://github.com/gorhill/uMatrix
  16. */
  17. body {
  18. background-color: white;
  19. border: 0;
  20. float: left;
  21. font: 14px httpsb,sans-serif;
  22. margin: 0;
  23. min-height: 16em;
  24. min-width: 32em;
  25. opacity: 1;
  26. overflow-x: hidden;
  27. overflow-y: auto;
  28. padding: 0;
  29. position: relative;
  30. }
  31. *:focus {
  32. outline: none;
  33. }
  34. a {
  35. color: inherit;
  36. text-decoration: none;
  37. }
  38. #version {
  39. font-size: 10px;
  40. font-weight: normal;
  41. }
  42. #gotoDashboard {
  43. background-color: #444;
  44. border: 0;
  45. color: #bbb;
  46. cursor: pointer;
  47. display: block;
  48. font-size: 12px;
  49. line-height: 12px;
  50. margin: 0;
  51. padding: 3px 0;
  52. position: relative;
  53. text-align: center;
  54. }
  55. #gotoDashboard > span:last-of-type {
  56. opacity: 0.5;
  57. position: absolute;
  58. }
  59. body[dir="ltr"] #gotoDashboard > span:last-of-type {
  60. left: 3px;
  61. }
  62. body[dir="rtl"] #gotoDashboard > span:last-of-type {
  63. right: 3px;
  64. }
  65. .paneHead {
  66. background-color: white;
  67. left: 0;
  68. padding: 0;
  69. position: fixed;
  70. right: 0;
  71. top: 0;
  72. z-index: 100;
  73. }
  74. .paneContent {
  75. padding-top: 5.5em;
  76. }
  77. .paneHead > a:first-child {
  78. background-color: #444;
  79. border: 0;
  80. border-bottom: 1px solid white;
  81. color: #bbb;
  82. cursor: pointer;
  83. display: block;
  84. font-family: sans-serif;
  85. line-height: 12px;
  86. margin: 0;
  87. padding: 2px 0;
  88. text-align: center;
  89. }
  90. #toolbarContainer {
  91. display: flex;
  92. justify-content: space-between;
  93. }
  94. .toolbar {
  95. border: 0;
  96. display: inline-flex;
  97. margin: 0;
  98. padding: 0;
  99. }
  100. body .toolbar button {
  101. background-color: white;
  102. border: 0;
  103. color: black;
  104. cursor: pointer;
  105. margin: 0;
  106. padding: 0.2em 0.2em 0.1em 0.2em;
  107. position: relative;
  108. }
  109. body .toolbar button:hover {
  110. background-color: #eee;
  111. }
  112. body .toolbar button.disabled {
  113. color: #ccc;
  114. }
  115. body .toolbar button.fa {
  116. font: 1.7em FontAwesome;
  117. min-width: 1.4em;
  118. }
  119. #mtxSwitch_matrix-off.switchTrue {
  120. color: #a00;
  121. }
  122. #mtxSwitches > li {
  123. align-items: center;
  124. color: #888;
  125. display: flex;
  126. }
  127. #mtxSwitches > li.switchTrue {
  128. color: #000;
  129. }
  130. #mtxSwitches > li > svg {
  131. display: inline;
  132. height: 1em;
  133. margin-right: 0.4em;
  134. width: 1.5em;
  135. }
  136. #mtxSwitches > li > svg * {
  137. fill-opacity: 1;
  138. opacity: 1;
  139. stroke: none;
  140. }
  141. #mtxSwitches > li.relevant > svg .dot {
  142. fill: #aaa;
  143. }
  144. #mtxSwitches > li.switchTrue.relevant > svg .dot {
  145. fill: #eee;
  146. }
  147. #mtxSwitches > li > svg .off,
  148. #mtxSwitches > li.switchTrue > svg .on,
  149. #mtxSwitches > li.relevant > svg .dot {
  150. display: block;
  151. }
  152. #mtxSwitches > li > svg .on,
  153. #mtxSwitches > li > svg .dot,
  154. #mtxSwitches > li.switchTrue > svg .off {
  155. display: none;
  156. }
  157. #mtxSwitches > li > span[data-i18n] {
  158. flex-grow: 1;
  159. }
  160. #mtxSwitches > li > a {
  161. color: #000;
  162. opacity: 0;
  163. }
  164. #mtxSwitches > li:hover > a {
  165. opacity: 0.1;
  166. }
  167. #mtxSwitches > li > a:hover {
  168. opacity: 0.8;
  169. }
  170. .dropdown-menu-capture {
  171. background-color: transparent;
  172. border: 0;
  173. bottom: 0;
  174. display: none;
  175. left: 0;
  176. margin: 0;
  177. padding: 0;
  178. position: fixed;
  179. right: 0;
  180. top: 0;
  181. z-index: 300;
  182. }
  183. .dropdown-menu-capture.show {
  184. display: block;
  185. }
  186. .dropdown-menu {
  187. border: 0;
  188. display: inline-block;
  189. margin: 0;
  190. padding: 3px 0 0 0;
  191. position: absolute;
  192. white-space: normal;
  193. }
  194. .dropdown-menu > ul {
  195. margin: 0;
  196. border: 0;
  197. border: 1px solid #ccc;
  198. border-radius: 4px;
  199. padding: 0;
  200. background-color: white;
  201. list-style-type: none;
  202. }
  203. .dropdown-menu > ul > li.dropdown-menu-entry {
  204. border: 0;
  205. color: black;
  206. cursor: pointer;
  207. margin: 0;
  208. padding: 0.2em 0.25em;
  209. white-space: nowrap;
  210. }
  211. .dropdown-menu > ul > li.dropdown-menu-entry:hover {
  212. background: #eee;
  213. }
  214. .dropdown-menu > ul > li.dropdown-menu-entry-divider {
  215. border-top: 1px solid #ccc;
  216. margin: 0.5em 0;
  217. }
  218. .dropdown-menu.show {
  219. display: block;
  220. }
  221. #buttonReload {
  222. margin-left: 1em;
  223. }
  224. button > span.badge {
  225. padding: 1px 1px;
  226. display: inline-block;
  227. font-size: 40%;
  228. position: absolute;
  229. right: 1px;
  230. bottom: 1px;
  231. color: #000;
  232. background-color: rgba(240,240,240,0.75)
  233. }
  234. button.disabled > span.badge {
  235. display: none;
  236. }
  237. #buttonPresets + .dropdown-menu {
  238. position: fixed;
  239. left: 10vw;
  240. width: 80vw;
  241. }
  242. .presetInfo {
  243. margin: 0.25em 0.5em;
  244. text-align: center;
  245. }
  246. .presetEntry {
  247. margin: 0.25em 0.25em;
  248. border-radius: 3px;
  249. padding: 0.5em;
  250. display: inline-block;
  251. cursor: pointer;
  252. background-color: #eee;
  253. }
  254. .presetEntry .fa {
  255. margin-right: 0.25em;
  256. font-size: 110%;
  257. }
  258. .presetEntry:hover {
  259. background-color: #80e2ff;
  260. }
  261. #presetMore > *:first-child {
  262. margin: 0;
  263. padding: 0;
  264. text-align: center;
  265. color: #888;
  266. cursor: pointer;
  267. font-size: 13px;
  268. }
  269. #presetMore > *:first-child + div {
  270. margin: 0.25em 0 0 0;
  271. padding: 0.25em 0 0 0;
  272. display: none;
  273. text-align: center;
  274. }
  275. #presetMore > *:first-child + div.show {
  276. display: block;
  277. }
  278. #presetMore > *:first-child + div > * {
  279. vertical-align: middle;
  280. }
  281. #presetMoreRecipe {
  282. border: 1px solid #aaa;
  283. width: 75%;
  284. height: 4em;
  285. overflow: hidden;
  286. resize: none;
  287. font-size: 10px;
  288. color: #888;
  289. }
  290. #presetMoreRecipe.bad {
  291. border: 1px solid #fcc;
  292. color: #aaa;
  293. }
  294. #presetMoreWrite.bad {
  295. visibility: hidden;
  296. }
  297. /* I think this is obsolete */
  298. .dropdown-menu > li > a > i {
  299. padding: 0 6px;
  300. font-size: 1.2em;
  301. }
  302. body .toolbar .scope {
  303. background-color: #ccc;
  304. border: 1px solid #ccc;
  305. box-sizing: content-box;
  306. -moz-box-sizing: content-box;
  307. display: inline-flex;
  308. color: white;
  309. margin: 0;
  310. padding: 1px;
  311. cursor: pointer;
  312. }
  313. body .toolbar .scope > span {
  314. align-items: center;
  315. display: inline-flex;
  316. }
  317. body .toolbar .scope > span > span {
  318. pointer-events: none;
  319. white-space: nowrap;
  320. }
  321. body .toolbar #specificScope {
  322. direction: ltr;
  323. justify-content: flex-end;
  324. width: 16em;
  325. }
  326. body .toolbar #specificScope.on {
  327. background-color: #24c;
  328. border-color: #24c;
  329. }
  330. body .toolbar #specificScope > span {
  331. background-color: #ccc;
  332. justify-content: flex-end;
  333. }
  334. body .toolbar #specificScope > span.on {
  335. background-color: #24c;
  336. }
  337. body .toolbar #specificScope > span:first-of-type:not(.on):hover,
  338. body .toolbar #specificScope > span:first-of-type:not(.on):hover ~ span:not(.on),
  339. body .toolbar #specificScope > span:not(.on) + span:not(.on):hover,
  340. body .toolbar #specificScope > span:not(.on) + span:not(.on):hover ~ span:not(.on) {
  341. background-color: #999;
  342. }
  343. body .toolbar #specificScope > span:first-of-type:not(.on):hover ~ span,
  344. body .toolbar #specificScope > span:not(.on) + span:not(.on):hover ~ span,
  345. body .toolbar #specificScope > span.on + span:hover,
  346. body .toolbar #specificScope > span.on + span:hover ~ span {
  347. background-color: #139;
  348. }
  349. body .toolbar #specificScope > span:first-of-type {
  350. flex: 1;
  351. }
  352. body .toolbar #globalScope {
  353. justify-content: center;
  354. margin-left: 1px;
  355. width: 1.8em;
  356. }
  357. body .toolbar #globalScope.on {
  358. background-color: #000;
  359. border-color: #000;
  360. }
  361. body .toolbar #globalScope:not(.on):hover {
  362. background-color: #999;
  363. border-color: #999;
  364. }
  365. body .toolbar .scopeRel {
  366. color: #24c;
  367. }
  368. body.globalScope .toolbar .scopeRel {
  369. color: #000;
  370. }
  371. body.globalScope .toolbar .scopeRel.disabled {
  372. color: #ccc;
  373. }
  374. .matrix {
  375. text-align: left;
  376. }
  377. .matRow {
  378. white-space: nowrap;
  379. }
  380. .matCell {
  381. margin: 1px 1px 0 0;
  382. border: 1px dotted rgba(0,0,0,0.2);
  383. padding: 6px 1px 3px 1px;
  384. display: inline-block;
  385. box-sizing: content-box;
  386. -moz-box-sizing: content-box;
  387. width: 2.6em;
  388. white-space: nowrap;
  389. text-align: center;
  390. line-height: 110%;
  391. position: relative;
  392. }
  393. #matHead {
  394. border-top: 1px dotted #ccc;
  395. padding-top: 1px;
  396. margin: 1px 0 0 0;
  397. }
  398. .paneHead .matCell:nth-child(2) {
  399. letter-spacing: -0.3px;
  400. }
  401. .paneContent .matrix .matRow > .matCell:first-child {
  402. font-weight: 100;
  403. }
  404. .paneContent .matrix .matRow > .matCell:first-child > b {
  405. font-weight: normal;
  406. }
  407. /* RFC 3987 Internationalized Resource Identifiers (IRIs) -- 4.4 */
  408. .matrix .matRow > .matCell:first-child {
  409. direction: ltr;
  410. text-align: right;
  411. unicode-bidi: embed;
  412. width: 16em;
  413. }
  414. .matrix .matGroup.g4 .matRow.ro > .matCell:first-child {
  415. direction: inherit;
  416. }
  417. .matrix .matRow.l2 > .matCell:first-child {
  418. margin-left: 1px;
  419. width: calc(16em - 1px);
  420. }
  421. .matrix .matRow > .matCell:hover {
  422. border-style: solid;
  423. }
  424. .matrix .matGroup .matSection {
  425. margin: 2px 0 0 0;
  426. border: 0;
  427. padding: 0;
  428. /* background-color: rgba(0,0,0,0.05); */
  429. }
  430. .matrix .matGroup.g0 .matSection:first-child {
  431. margin-top: 0;
  432. }
  433. .matrix .matGroup.g4 .matSection:first-child {
  434. margin-top: 0;
  435. }
  436. /* Collapsing of domains */
  437. .matrix .matSection .matRow.meta {
  438. display: none;
  439. }
  440. .matrix .matSection.collapsible.collapsed .matRow.meta {
  441. display: block;
  442. }
  443. .matrix .matSection.collapsible.collapsed .matRow.l1:not(.meta) {
  444. display: none;
  445. }
  446. .matrix .matSection.collapsible.collapsed .matRow.l2.collapsible {
  447. display: none;
  448. }
  449. /* Collapsing of blacklisted */
  450. .matrix .g4Meta {
  451. margin: 0;
  452. padding: 0;
  453. border: 0;
  454. height: 6px;
  455. background: url('../img/matrix-group-hide.png') no-repeat center top,
  456. url('../img/matrix-group-hline.png') repeat-x center top 3px;
  457. opacity: 0.2;
  458. cursor: pointer;
  459. }
  460. .matrix .g4Meta:hover {
  461. opacity: 0.4;
  462. }
  463. .matrix .g4Meta.g4Collapsed {
  464. background: url('../img/matrix-group-show.png') no-repeat center top,
  465. url('../img/matrix-group-hline.png') repeat-x center top 3px;
  466. }
  467. .matrix .g4Meta.g4Collapsed ~ .matSection {
  468. display: none;
  469. }
  470. body.powerOff .matrix .g4Meta.g4Collapsed ~ .matSection {
  471. display: block;
  472. }
  473. .matrix .g4Meta ~ .matRow.ro {
  474. display: none;
  475. }
  476. .matrix .g4Meta.g4Collapsed ~ .matRow.ro {
  477. display: block;
  478. }
  479. body.powerOff .matrix .g4Meta.g4Collapsed ~ .matRow.ro {
  480. display: none;
  481. }
  482. .matrix .matGroup .g4Meta + *,.matrix .matGroup .g4Meta + * + * {
  483. margin-top: 0;
  484. padding-top: 0;
  485. }
  486. /* Cell coloring */
  487. .t81 {
  488. color: white;
  489. background-color: #c00;
  490. }
  491. .t82 {
  492. color: white;
  493. background-color: #080;
  494. }
  495. .t1 {
  496. border-color: #debaba;
  497. color: black;
  498. background-color: #f8d0d0;
  499. }
  500. .t2 {
  501. border-color: #bad6ba;
  502. color: black;
  503. background-color: #d0f0d0;
  504. }
  505. .matCell.p81 {
  506. background-image: url('../img/permanent-black-small.png');
  507. background-repeat: no-repeat;
  508. background-position: -1px -1px;
  509. }
  510. .matCell.p82 {
  511. background-image: url('../img/permanent-white-small.png');
  512. background-repeat: no-repeat;
  513. background-position: -1px -1px;
  514. }
  515. /* Cell coloring for color blind-friendly (hopefully) */
  516. body.colorblind .t81 {
  517. color: white;
  518. background-color: rgb(0, 19, 110);
  519. }
  520. body.colorblind .t82 {
  521. border-color: rgb(255, 194, 57);
  522. color: black;
  523. background-color: rgb(255, 194, 57);
  524. }
  525. body.colorblind .t1 {
  526. border-color: rgba(0, 19, 110, 0.3);
  527. color: black;
  528. background-color: rgba(0, 19, 110, 0.2);
  529. }
  530. body.colorblind .t2 {
  531. border-color: rgba(255, 194, 57, 0.3);
  532. color: black;
  533. background-color: rgba(255, 194, 57, 0.2);
  534. }
  535. body.colorblind .matCell.p81 {
  536. background-image: url('../img/permanent-black-small-cb.png');
  537. }
  538. body.colorblind .matCell.p82 {
  539. background-image: url('../img/permanent-white-small-cb.png');
  540. }
  541. .matRow.rw .matCell {
  542. cursor: pointer;
  543. }
  544. body.powerOff .matRow.rw .matCell {
  545. cursor: auto;
  546. opacity: 0.6;
  547. }
  548. .top {
  549. font-weight: bold;
  550. }
  551. #cellHotspots {
  552. margin: 0;
  553. border: 0;
  554. padding: 0;
  555. position: absolute;
  556. left: 0;
  557. top: 0;
  558. width: 100%;
  559. height: 100%;
  560. z-index: 10;
  561. }
  562. #whitelist, #blacklist {
  563. margin: 0;
  564. border: 0;
  565. padding: 0;
  566. position: absolute;
  567. left: 0;
  568. width: 100%;
  569. height: 50%;
  570. background: transparent;
  571. }
  572. #whitelist {
  573. top: 0;
  574. }
  575. #blacklist {
  576. top: 50%;
  577. }
  578. body.powerOff #whitelist, body.powerOff #blacklist {
  579. display: none;
  580. }
  581. .rw .matCell.t1 #whitelist:hover {
  582. background-color: #080;
  583. opacity: 0.25;
  584. }
  585. body.colorblind .rw .matCell.t1 #whitelist:hover,
  586. body.colorblind .rw .matCell.t2 #whitelist:hover {
  587. background-color: rgb(255, 194, 57);
  588. opacity: 0.6;
  589. }
  590. .rw .matCell.t2 #whitelist:hover {
  591. background-color: #080;
  592. opacity: 0.25;
  593. }
  594. .matCell.t81 #whitelist:hover {
  595. background-color: transparent;
  596. }
  597. .matCell.t82 #whitelist:hover {
  598. background-color: transparent;
  599. }
  600. .rw .matCell.t1 #blacklist:hover {
  601. background-color: #c00;
  602. opacity: 0.25;
  603. }
  604. body.colorblind .rw .matCell.t1 #blacklist:hover,
  605. body.colorblind .rw .matCell.t2 #blacklist:hover {
  606. background-color: rgb(0, 19, 110);
  607. opacity: 0.4;
  608. }
  609. .rw .matCell.t2 #blacklist:hover {
  610. background-color: #c00;
  611. opacity: 0.25;
  612. }
  613. .matCell.t81 #blacklist:hover {
  614. background-color: transparent;
  615. }
  616. .matCell.t82 #blacklist:hover {
  617. background-color: transparent;
  618. }
  619. #domainOnly {
  620. margin: 0;
  621. border: 1px solid gray;
  622. border-radius: 3px;
  623. padding: 0 1px;
  624. position: absolute;
  625. font-size: 1.1em;
  626. left: 20%;
  627. bottom: -20%;
  628. display: none;
  629. color: black;
  630. background-color: white;
  631. opacity: 0.25;
  632. z-index: 10000;
  633. cursor: pointer;
  634. }
  635. .matSection #domainOnly .fa:before {
  636. content: '\f106';
  637. }
  638. .matSection.collapsed #domainOnly .fa:before {
  639. content: '\f107';
  640. }
  641. .matSection.collapsible .matRow.l1 .matCell:nth-of-type(1):hover #domainOnly {
  642. display: block;
  643. }
  644. #matHead #domainOnly .fa:before {
  645. content: '\f106';
  646. }
  647. #matHead.collapsed #domainOnly .fa:before {
  648. content: '\f107';
  649. }
  650. #matHead.collapsible .matRow .matCell:nth-of-type(1):hover #domainOnly {
  651. display: block;
  652. }
  653. #domainOnly:hover {
  654. opacity: 1;
  655. }
  656. /* No data was found for the tab */
  657. body.noTabFound .paneHead,
  658. body.noTabFound .paneContent {
  659. display: none;
  660. }
  661. body.noTabFound #noTabFound {
  662. align-items: center;
  663. color: gray;
  664. display: flex;
  665. font-size: xx-large;
  666. height: 100vh;
  667. justify-content: center;
  668. }
  669. /* Mobile-friendly rules */
  670. body.hConstrained {
  671. overflow-x: auto;
  672. }
  673. body.hConstrained .paneHead {
  674. left: auto;
  675. position: absolute;
  676. right: auto;
  677. width: 100%;
  678. }
  679. body[data-touch="true"] .matCell {
  680. line-height: 200%;
  681. }