manage.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. <html id="stylus">
  2. <head>
  3. <meta charset="UTF-8">
  4. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  5. <title i18n-text="manageTitle"></title>
  6. <link rel="stylesheet" href="manage/manage.css">
  7. <link rel="stylesheet" href="msgbox/msgbox.css">
  8. <link rel="stylesheet" href="options/onoffswitch.css">
  9. <style id="style-overrides"></style>
  10. <style id="firefox-transitions-bug-suppressor">
  11. /* restrict to FF */
  12. @-moz-document url-prefix("") {
  13. /* increased specificity to override sane selectors in user styles */
  14. html#stylus.firefox #stylus-manage #header * {
  15. transition: none !important;
  16. }
  17. }
  18. </style>
  19. <!-- Notes:
  20. * Chrome doesn't garbage-collect (or even leaks) SVG <symbol> referenced via <use> so we'll embed the code directly
  21. * inter-tag whitespace in templates is automatically removed in localization.js
  22. * i18n-anything attribute automatically creates "anything" attribute
  23. -->
  24. <template data-id="style">
  25. <div class="entry">
  26. <h2 class="style-name">
  27. <a class="style-name-link"></a>
  28. <a target="_blank" class="homepage"></a>
  29. </h2>
  30. <p class="applies-to">
  31. <label i18n-text="appliesDisplay"></label>
  32. <span class="targets"></span>
  33. </p>
  34. <p class="actions">
  35. <a class="style-edit-link">
  36. <button i18n-text="editStyleLabel"></button>
  37. </a>
  38. <button class="enable" i18n-text="enableStyleLabel"></button>
  39. <button class="disable" i18n-text="disableStyleLabel"></button>
  40. <button class="delete" i18n-text="deleteStyleLabel"></button>
  41. <button class="check-update" i18n-text="checkForUpdate"></button>
  42. <button class="update" i18n-text="installUpdate"></button>
  43. <span class="update-note"></span>
  44. </p>
  45. </div>
  46. </template>
  47. <template data-id="styleCompact">
  48. <div class="entry">
  49. <h2 class="style-name">
  50. <input class="checker" type="checkbox" i18n-title="toggleStyle">
  51. <a class="style-name-link"></a>
  52. </h2>
  53. <p class="actions">
  54. <a target="_blank" class="homepage"></a>
  55. <span i18n-title="deleteStyleLabel">
  56. <svg class="svg-icon delete" viewBox="0 0 20 20">
  57. <polygon points="16.2,5.5 14.5,3.8 10,8.3 5.5,3.8 3.8,5.5 8.3,10 3.8,14.5
  58. 5.5,16.2 10,11.7 14.5,16.2 16.2,14.5 11.7,10 "/>
  59. </svg>
  60. </span>
  61. </p>
  62. <div class="applies-to">
  63. <div class="targets"></div>
  64. <span class="expander">...</span>
  65. </div>
  66. </div>
  67. </template>
  68. <template data-id="homepageIconBig">
  69. <svg class="svg-icon" viewBox="0 0 20 20">
  70. <polygon shape-rendering="crispEdges" points="3,3 3,17 17,17 17,13 15,13 15,15 5,15 5,5 7,5 7,3 "/>
  71. <polygon points="10,3 12.5,5.5 8,10 10,12 14.5,7.5 17,10 17,3 "/>
  72. </svg>
  73. </template>
  74. <template data-id="homepageIconSmall">
  75. <svg class="svg-icon" viewBox="0 0 20 20">
  76. <path d="M4,4h5v2H6v8h8v-3h2v5H4V4z M11,3h6v6l-2-2l-4,4L9,9l4-4L11,3z"/>
  77. </svg>
  78. </template>
  79. <template data-id="configureIcon">
  80. <span class="configure-usercss" i18n-title="configureStyle">
  81. <svg class="svg-icon" viewBox="0 0 20 20">
  82. <path
  83. d="M 10,2.0423828 A 7.9575898,7.9575898 0 0 0 8.8908203,2.1285156 V 4.355664 A 5.7578608,5.7578608 0 0 0 6.7919922,5.2240235 l -1.575,-1.575 A 7.9575898,7.9575898 0 0 0 3.6507813,5.21875 L 5.2222656,6.7902344 A 5.7578608,5.7578608 0 0 0 4.3521485,8.8908203 H 2.1302735 A 7.9575898,7.9575898 0 0 0 2.0423828,10 7.9575898,7.9575898 0 0 0 2.1285156,11.10918 H 4.355664 a 5.7578608,5.7578608 0 0 0 0.8683595,2.098828 l -1.575,1.575 A 7.9575898,7.9575898 0 0 0 5.21875,16.349219 l 1.5714844,-1.571484 a 5.7578608,5.7578608 0 0 0 2.1005859,0.870117 v 2.221875 A 7.9575898,7.9575898 0 0 0 10,17.957617 a 7.9575898,7.9575898 0 0 0 1.10918,-0.08613 v -2.227149 a 5.7578608,5.7578608 0 0 0 2.098828,-0.868359 l 1.575,1.575 a 7.9575898,7.9575898 0 0 0 1.566211,-1.569727 l -1.571484,-1.571485 a 5.7578608,5.7578608 0 0 0 0.870117,-2.100585 h 2.221875 A 7.9575898,7.9575898 0 0 0 17.957617,10 7.9575898,7.9575898 0 0 0 17.871485,8.8908203 H 15.644336 A 5.7578608,5.7578608 0 0 0 14.775977,6.7919922 l 1.575,-1.575 A 7.9575898,7.9575898 0 0 0 14.78125,3.6507813 L 13.209765,5.2222656 A 5.7578608,5.7578608 0 0 0 11.10918,4.3521485 V 2.1302735 A 7.9575898,7.9575898 0 0 0 10,2.0423828 Z m 0,4.2574219 A 3.6994645,3.6994645 0 0 1 13.700195,10 3.6994645,3.6994645 0 0 1 10,13.700195 3.6994645,3.6994645 0 0 1 6.2998047,10 3.6994645,3.6994645 0 0 1 10,6.2998047 Z"
  84. />
  85. </svg>
  86. </span>
  87. </template>
  88. <template data-id="updaterIcons">
  89. <span class="updater-icons">
  90. <span class="check-update" i18n-title="checkForUpdate">
  91. <svg class="svg-icon" viewBox="0 0 20 20">
  92. <path d="M18,16.6l-3.1-3.1c0.5-0.7,0.9-1.5,1-2.5h-2.1c-0.4,1.7-2,3-3.9,3c-0.8,0-1.6-0.3-2.3-0.7
  93. L10,11H6.1H4.1H4v6l2.3-2.3c1,0.8,2.3,1.3,3.7,1.3c1.3,0,2.5-0.4,3.5-1.1l3.1,3.1L18,16.6z"/>
  94. <path d="M10,6c0.8,0,1.6,0.3,2.3,0.7L10,9h3.9h2.1H16V3l-2.3,2.3C12.7,4.5,11.4,4,10,4
  95. C7,4,4.6,6.2,4.1,9h2.1C6.6,7.3,8.1,6,10,6z"/>
  96. </svg>
  97. </span>
  98. <span class="update" i18n-title="installUpdate">
  99. <svg class="svg-icon" viewBox="0 0 20 20">
  100. <polygon points="16,8 12,8 12,3 8,3 8,8 4,8 10,14 "/>
  101. <rect shape-rendering="crispEdges" x="4" y="15" width="12" height="2"/>
  102. </svg>
  103. </span>
  104. <span class="up-to-date" i18n-title="updateCheckSucceededNoUpdate">
  105. <svg class="svg-icon" viewBox="0 0 20 20">
  106. <polygon points="15.83 4.75 8.76 11.82 5.2 8.26 3.51 9.95 8.76 15.19 17.52 6.43 15.83 4.75"/>
  107. </svg>
  108. </span>
  109. <span class="updated" i18n-title="updateCompleted">
  110. <svg class="svg-icon" viewBox="0 0 20 20">
  111. <polygon points="15.83 4.75 8.76 11.82 5.2 8.26 3.51 9.95 8.76 15.19 17.52 6.43 15.83 4.75"/>
  112. </svg>
  113. </span>
  114. <span class="update-note"></span>
  115. </span>
  116. </template>
  117. <template data-id="appliesToTarget">
  118. <span class="target"></span>
  119. </template>
  120. <template data-id="appliesToSeparator">
  121. <span class="sep">, </span>
  122. </template>
  123. <template data-id="appliesToEverything">
  124. <span class="target" i18n-text="appliesToEverything"></span>
  125. </template>
  126. <template data-id="extraAppliesTo">
  127. <details class="applies-to-extra">
  128. <summary i18n-text="appliesDisplayTruncatedSuffix"></summary>
  129. </details>
  130. </template>
  131. <script src="js/dom.js"></script>
  132. <script src="js/messaging.js"></script>
  133. <script src="js/prefs.js"></script>
  134. <script src="content/apply.js"></script>
  135. <script src="js/localization.js"></script>
  136. <script src="manage/filters.js"></script>
  137. <script src="manage/updater-ui.js"></script>
  138. <script src="manage/object-diff.js"></script>
  139. <script src="js/color-parser.js"></script>
  140. <script src="manage/config-dialog.js"></script>
  141. <script src="manage/manage.js"></script>
  142. </head>
  143. <body id="stylus-manage" i18n-dragndrop-hint="dragDropMessage">
  144. <div id="header">
  145. <h1 id="manage-heading" i18n-text="manageHeading"></h1>
  146. <fieldset>
  147. <legend id="filters">
  148. <span i18n-text="manageFilters"></span><span id="filters-stats"></span>
  149. </legend>
  150. <label>
  151. <input id="manage.onlyEnabled" type="checkbox"
  152. data-filter=".enabled"
  153. data-filter-hide=".disabled">
  154. <select id="manage.onlyEnabled.invert">
  155. <option i18n-text="manageOnlyEnabled" value="false"></option>
  156. <option i18n-text="manageOnlyDisabled" value="true"></option>
  157. </select>
  158. </label>
  159. <label>
  160. <input id="manage.onlyLocal" type="checkbox"
  161. data-filter=":not(.updatable)"
  162. data-filter-hide=".updatable">
  163. <select id="manage.onlyLocal.invert" i18n-title="manageOnlyLocalTooltip">
  164. <option i18n-text="manageOnlyLocal" value="false"></option>
  165. <option i18n-text="manageOnlyExternal" value="true"></option>
  166. </select>
  167. </label>
  168. <label>
  169. <input id="manage.onlyUsercss" type="checkbox"
  170. data-filter=".usercss"
  171. data-filter-hide=":not(.usercss)">
  172. <select id="manage.onlyUsercss.invert">
  173. <option i18n-text="manageOnlyUsercss" value="false"></option>
  174. <option i18n-text="manageOnlyNonUsercss" value="true"></option>
  175. </select>
  176. </label>
  177. <label id="onlyUpdates" class="hidden">
  178. <input type="checkbox"
  179. data-filter=".can-update, .update-problem, .update-done"
  180. data-filter-hide=":not(.updatable):not(.update-done), .no-update:not(.update-problem)">
  181. <span i18n-text="manageOnlyUpdates"></span>
  182. </label>
  183. <input id="search" type="search" i18n-placeholder="searchStyles" spellcheck="false"
  184. i18n-title="searchStylesTooltip"
  185. data-filter=":not(.not-matching)"
  186. data-filter-hide=".not-matching">
  187. </fieldset>
  188. <p class="nowrap">
  189. <button id="check-all-updates" i18n-text="checkAllUpdates"><span id="update-progress"></span></button>
  190. <span id="update-history" i18n-title="genericHistoryLabel">
  191. <svg class="svg-icon" viewBox="0 0 20 20" i18n-alt="helpAlt">
  192. <path d="M13,7H7V6h6Zm6,6.5A5.5,5.5,0,0,1,8.61,16H4V3H16V8.61A5.5,5.5,0,0,1,19,13.5ZM8,14c0-.16,0-.84,0-1H7V12H8.21a5.46,5.46,0,0,1,.39-1H7V10H9.26a5.55,5.55,0,0,1,1.09-1H7V8h7V5H6v9Zm10-.5A4.5,4.5,0,1,0,13.5,18,4.5,4.5,0,0,0,18,13.5ZM14,13V10H13v4h4V13Z"/>
  193. </svg>
  194. </span>
  195. </p>
  196. <p>
  197. <button id="apply-all-updates" class="hidden" i18n-text="applyAllUpdates"></button>
  198. <span id="update-all-no-updates" class="hidden" i18n-text="updateAllCheckSucceededNoUpdate"></span>
  199. <button id="check-all-updates-force" class="hidden" i18n-text="checkAllUpdatesForce"></button>
  200. </p>
  201. <p>
  202. <a href="edit.html">
  203. <button id="add-style-label" i18n-text="addStyleLabel"></button>
  204. </a>
  205. <label id="newStyleAsUsercss-wrapper" class="nobreak">
  206. <input type="checkbox" id="newStyleAsUsercss">
  207. <span i18n-text="manageNewStyleAsUsercss" i18n-title="optionsAdvancedNewStyleAsUsercss"></span>
  208. <a id="usercss-wiki"
  209. href="https://github.com/openstyles/stylus/wiki/Usercss"
  210. i18n-title="externalUsercssDocument">
  211. <svg class="svg-icon" viewBox="0 0 20 20">
  212. <path d="M4,4h5v2H6v8h8v-3h2v5H4V4z M11,3h6v6l-2-2l-4,4L9,9l4-4L11,3z"/>
  213. </svg>
  214. </a>
  215. </label>
  216. </p>
  217. <div id="options">
  218. <h2 id="options-heading" i18n-text="optionsHeading"></h2>
  219. <label><input id="manage.newUI" type="checkbox"><span i18n-text="manageNewUI"></span></label>
  220. <div id="newUIoptions">
  221. <div>
  222. <input id="manage.newUI.favicons" type="checkbox">
  223. <label for="manage.newUI.favicons" i18n-text="manageFavicons"></label>
  224. <svg class="svg-icon info" viewBox="0 0 14 16" i18n-alt="helpAlt" data-toggle-on-click="#faviconsHelp">
  225. <path fill-rule="evenodd" d="M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"></path>
  226. </svg>
  227. <div id="faviconsHelp" class="hidden" i18n-text="manageFaviconsHelp">
  228. <div>
  229. <input id="manage.newUI.faviconsGray" type="checkbox">
  230. <label for="manage.newUI.faviconsGray" i18n-text="manageFaviconsGray"></label>
  231. </div>
  232. </div>
  233. </div>
  234. <label><input id="manage.newUI.targets" type="number" min="1" max="99"><span i18n-text="manageMaxTargets"></span></label>
  235. </div>
  236. <p>
  237. <button id="manage-options-button" i18n-text="openOptionsManage"></button>
  238. <button id="manage-shortcuts-button" class="chromium-only"
  239. i18n-text="shortcuts"
  240. i18n-title="shortcutsNote"></button>
  241. <a id="find-editor-styles"
  242. href="https://userstyles.org/styles/browse/chrome-extension"
  243. i18n-title="editorStylesButton"
  244. target="_blank"><button i18n-text="cm_theme"></button></a>
  245. </p>
  246. </div>
  247. <div id="backup">
  248. <h2 id="backup-title" i18n-text="backupButtons"></h2>
  249. <span id="backup-message" i18n-text="backupMessage"></span>
  250. <p>
  251. <button id="file-all-styles" i18n-text="bckpInstStyles"></button>
  252. <button id="unfile-all-styles" i18n-text="retrieveBckp"></button>
  253. </p>
  254. </div>
  255. <p id="manage-text" i18n-html="manageText"></p>
  256. </div>
  257. <div id="installed"></div>
  258. <script src="manage/fileSaveLoad.js"></script>
  259. <script src="msgbox/msgbox.js"></script>
  260. </body>
  261. </html>