浏览代码

Some minor tweaks to options page

master
Said Achmiz 6 年前
父节点
当前提交
78f3349d62
共有 3 个文件被更改,包括 22 次插入4 次删除
  1. 13
    3
      options.css
  2. 6
    1
      options.html
  3. 3
    0
      options.js

+ 13
- 3
options.css 查看文件

position: relative; position: relative;
} }
body > div + div { body > div + div {
margin: 2.5em 0 0 0;
margin: 2.5em 0 1em 0;
} }
h1 { h1 {
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;
font-family: Inconsolata, Courier, monospace; font-family: Inconsolata, Courier, monospace;
font-size: 4em; font-size: 4em;
} }
body > p {
padding: 0 15px;
p.note {
font-size: 0.875em;
} }
.bottom-info {
font-size: 0.875rem;
color: #aaa;
text-align: center;
margin: 1em 0;
line-height: 1.6;
}
.bottom-info p {
margin: 0;
}

+ 6
- 1
options.html 查看文件

<head> <head>
<title>Always Kill Sticky - Options</title> <title>Always Kill Sticky - Options</title>
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
<link rel='stylesheet' type='text/css' href='options.css' /> <link rel='stylesheet' type='text/css' href='options.css' />
<link rel="shortcut icon" type="image/png" href="images/ASK_on_32.png" /> <link rel="shortcut icon" type="image/png" href="images/ASK_on_32.png" />
</head> </head>
<div id='exclusionPatterns'> <div id='exclusionPatterns'>
<h2>Exclusion patterns</h2> <h2>Exclusion patterns</h2>
<p>Do <strong>not</strong> kill stickies on web page URLs matching the following <a href='https://regexr.com/' rel='nofollow' target='_blank'>regular expressions</a> (one per line):</p> <p>Do <strong>not</strong> kill stickies on web page URLs matching the following <a href='https://regexr.com/' rel='nofollow' target='_blank'>regular expressions</a> (one per line):</p>
<p class='note'>(<strong>NOTE:</strong> 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>
<div class='textarea-container'> <div class='textarea-container'>
<textarea spellcheck="false"></textarea> <textarea spellcheck="false"></textarea>
</div> </div>
</div> </div>
<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>
<div class='bottom-info'>
<p class='bottom-info'>AlwaysKillSticky v<span class='version'>0.0</span></p>
<p class='bottom-info'>© Said Achmiz 2019–present</p>
</div>
</body> </body>
<script src="functions.js"></script> <script src="functions.js"></script>
<script src="options.js"></script> <script src="options.js"></script>

+ 3
- 0
options.js 查看文件

document.querySelector(`${divToFocus} textarea`).focus(); document.querySelector(`${divToFocus} textarea`).focus();
}); });


// Update version.
document.querySelector(".bottom-info .version").innerHTML = chrome.runtime.getManifest().version;

// Listeners for Reset and Save buttons. // Listeners for Reset and Save buttons.
document.querySelectorAll("button").forEach(button => { document.querySelectorAll("button").forEach(button => {
button.addActivateEvent((event) => { button.addActivateEvent((event) => {

正在加载...
取消
保存