Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

options.html 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Always Kill Sticky - Options</title>
  5. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  6. <style>
  7. html {
  8. box-sizing: border-box;
  9. font-size: 16px;
  10. }
  11. *, *::before, *::after {
  12. box-sizing: inherit;
  13. }
  14. body {
  15. margin: 0 auto;
  16. display: flex;
  17. flex-flow: column;
  18. max-width: 640px;
  19. min-height: 100vh;
  20. padding: 10px;
  21. font-size: 1rem;
  22. }
  23. body > div {
  24. border: 1px solid #ddd;
  25. padding: 30px 15px 15px 15px;
  26. position: relative;
  27. }
  28. body > div + div {
  29. margin: 2.5em 0 0 0;
  30. }
  31. h1 {
  32. border-bottom: 1px solid #ddd;
  33. margin: 0.5em 0;
  34. }
  35. h2 {
  36. margin: 0;
  37. background-color: #fff;
  38. padding: 10px 15px;
  39. position: absolute;
  40. top: calc(-1 * (0.625em + 10px));
  41. left: 10px;
  42. border: inherit;
  43. }
  44. textarea {
  45. border: 1px solid #aaa;
  46. font-family: Inconsolata, Courier, monospace;
  47. font-size: 1.125rem;
  48. width: 100%;
  49. display: block;
  50. }
  51. #matchingPatterns textarea {
  52. min-height: 300px;
  53. }
  54. #exclusionPatterns textarea {
  55. min-height: 150px;
  56. }
  57. form {
  58. text-align: right;
  59. margin: 0 0 2.5em 0;
  60. display: flex;
  61. align-items: center;
  62. }
  63. form .buttons {
  64. display: flex;
  65. align-items: center;
  66. justify-content: flex-end;
  67. flex: 1 1 0;
  68. }
  69. button {
  70. -webkit-appearance: none;
  71. -moz-appearance: none;
  72. border: 1px solid #bbb;
  73. color: #fff;
  74. padding: 10px 16px;
  75. cursor: default;
  76. margin: 0 0 0 0.5em;
  77. }
  78. button.save-button {
  79. background-color: #16e;
  80. font-size: 1.5rem;
  81. }
  82. button.reset-button {
  83. background-color: #d3453d;
  84. font-size: 1rem;
  85. }
  86. button:active {
  87. transform: scale(0.95);
  88. }
  89. button:focus:active {
  90. outline: none;
  91. }
  92. button:disabled {
  93. background-color: #777;
  94. opacity: 0.3;
  95. }
  96. input#whitelist-mode {
  97. display: block;
  98. -webkit-appearance: none;
  99. -moz-appearance: none;
  100. border: 1px solid #000;
  101. font-size: 1rem;
  102. height: 2em;
  103. width: 4em;
  104. margin: 0 6px;
  105. background-color: #000;
  106. box-shadow:
  107. -2em 0 0 1px #fff inset,
  108. 0 0 0 3px #fff inset;
  109. }
  110. input#whitelist-mode:checked {
  111. border: 1px solid #fff;
  112. background-color: #fff;
  113. box-shadow:
  114. 2em 0 0 1px #000 inset,
  115. 0 0 0 3px #000 inset;
  116. }
  117. input#whitelist-mode,
  118. .mode-select-container span {
  119. cursor: pointer;
  120. }
  121. .mode-select-container {
  122. white-space: nowrap;
  123. display: flex;
  124. align-items: center;
  125. align-self: flex-start;
  126. border: 1px solid #ddd;
  127. padding: 8px 10px;
  128. cursor: default;
  129. background-color: #fff;
  130. }
  131. .mode-select-container.whitelist {
  132. background-color: #000;
  133. color: #fff;
  134. }
  135. .mode-select-container:not(.whitelist) .blacklist-mode-label,
  136. .mode-select-container.whitelist .whitelist-mode-label {
  137. border-bottom: 1px dotted currentColor;
  138. }
  139. .mode-select-container span::selection {
  140. background-color: transparent;
  141. }
  142. .mode-select-container span.disabled {
  143. pointer-events: none;
  144. }
  145. .mode-select-container span:not(.disabled):hover {
  146. border-bottom: 1px solid currentColor;
  147. }
  148. form button:not(:disabled):hover {
  149. text-shadow:
  150. 0 0 1px #fff,
  151. 0 0 3px #fff,
  152. 0 0 5px #fff;
  153. cursor: pointer;
  154. }
  155. #matchingPatterns.disabled h2 {
  156. color: rgba(0,0,0,0.15);
  157. }
  158. #matchingPatterns.disabled p {
  159. opacity: 0.2;
  160. }
  161. #matchingPatterns.disabled .textarea-container {
  162. position: relative;
  163. }
  164. #matchingPatterns.disabled .textarea-container::before {
  165. content: ".*";
  166. display: flex;
  167. position: absolute;
  168. background-color: rgba(232,232,232,0.9);
  169. width: 100%;
  170. height: 100%;
  171. z-index: 1;
  172. justify-content: center;
  173. align-items: center;
  174. font-family: Inconsolata, Courier, monospace;
  175. font-size: 4em;
  176. }
  177. body > p {
  178. padding: 0 15px;
  179. }
  180. </style>
  181. </head>
  182. <body>
  183. <h1>Always Kill Sticky</h1>
  184. <form>
  185. <span class='mode-select-container'>
  186. <span class='blacklist-mode-label'>Blacklist mode</span>
  187. <input type='checkbox' id='whitelist-mode'></input>
  188. <span class='whitelist-mode-label'>Whitelist mode</span>
  189. </span>
  190. <span class='buttons'>
  191. <button disabled type='button' class='reset-button'>Reset</button>
  192. <button disabled type='button' class='save-button'>Save</button>
  193. </span>
  194. </form>
  195. <div id='matchingPatterns'>
  196. <h2>Matching patterns</h2>
  197. <p>Kill stickies on web page URLs matching the following <a href='https://regexr.com/' rel='nofollow'>regular expressions</a> (one per line):</p>
  198. <div class='textarea-container'>
  199. <textarea spellcheck="false"></textarea>
  200. </div>
  201. </div>
  202. <div id='exclusionPatterns'>
  203. <h2>Exclusion patterns</h2>
  204. <p>Do <strong>not</strong> kill stickies on web page URLs matching the following <a href='https://regexr.com/' rel='nofollow'>regular expressions</a> (one per line):</p>
  205. <div class='textarea-container'>
  206. <textarea spellcheck="false"></textarea>
  207. </div>
  208. </div>
  209. <p>NOTE: Exclusion patterns override matching patterns; if a page is <em>both</em> matched <em>and</em> excluded, stickies will <strong>not</strong> be killed on that page.</p>
  210. </body>
  211. <script src="functions.js"></script>
  212. <script src="options.js"></script>
  213. </html>