diff --git a/content/install-user-css.css b/content/install-user-css.css index 5488964f..4cba66ab 100644 --- a/content/install-user-css.css +++ b/content/install-user-css.css @@ -24,8 +24,8 @@ body { margin-top: 0; } -.meta { - font-size: 1.4em; +h1 small { + font-size: 0.6em; } .warning { @@ -48,6 +48,21 @@ body { display: inline-block; } +.external { + text-align: center; +} + +.external > * { + margin: 0 7.5px; +} + +button.install { + display: block; + margin: 0 auto; + font-size: 2em; + padding: 0.4em 0.8em; +} + .code { padding: 2em; font-family: monospace; diff --git a/content/install-user-css.js b/content/install-user-css.js index 9247a358..e5ca4b5b 100644 --- a/content/install-user-css.js +++ b/content/install-user-css.js @@ -24,7 +24,7 @@ function install(style) { }); return communicate(request) .then(() => { - $$('.meta-version + .warning') + $$('.warning') .forEach(el => el.remove()); $('button.install').textContent = 'Installed'; $('button.install').disabled = true; @@ -46,6 +46,23 @@ function communicate(request) { }); } +function getAppliesTo(style) { + function *_gen() { + for (const section of style.sections) { + for (const type of ['urls', 'urlPrefixes', 'domains', 'regexps']) { + if (section[type]) { + yield *section[type]; + } + } + } + } + const result = [..._gen()]; + if (!result.length) { + result.push('All URLs'); + } + return result; +} + function initInstallPage({style, dup}) { pendingResource.then(() => { const versionTest = dup && usercss.semverTest(style.version, dup.version); @@ -54,21 +71,30 @@ function initInstallPage({style, dup}) { document.body.appendChild(tHTML(`
${err}