aboutsummaryrefslogtreecommitdiffstats
path: root/pages
diff options
context:
space:
mode:
Diffstat (limited to 'pages')
-rw-r--r--pages/options.coffee7
-rw-r--r--pages/options.html2
-rw-r--r--pages/popup.html2
3 files changed, 5 insertions, 6 deletions
diff --git a/pages/options.coffee b/pages/options.coffee
index 249677be..def67fd7 100644
--- a/pages/options.coffee
+++ b/pages/options.coffee
@@ -120,7 +120,7 @@ class ExclusionRulesOption extends Option
haveMatch = false
for element in elements
pattern = element.children[0].firstChild.value.trim()
- if @url.match bgExclusions.RegexpCache.get pattern
+ if 0 <= @url.search bgExclusions.RegexpCache.get pattern
haveMatch = true
element.children[1].firstChild.focus()
else
@@ -131,14 +131,13 @@ class ExclusionRulesOption extends Option
# On the popup page, provide visual feedback when a pattern does not match the current page. This assumes
# that @url is not empty.
activatePatternWatcher: (element) ->
- computedStyle = window.getComputedStyle(element)
- originalColor = computedStyle.getPropertyValue("color")
patternElement = element.children[0].firstChild
patternElement.addEventListener "keyup", =>
if @url.match bgExclusions.RegexpCache.get patternElement.value
- patternElement.style.color = originalColor
+ patternElement.title = patternElement.style.color = ""
else
patternElement.style.color = "red"
+ patternElement.title = "Red text means that the pattern does not\nmatch the current URL."
# Append a row for a new rule.
appendRule: (rule) ->
diff --git a/pages/options.html b/pages/options.html
index 51a53634..9a0368a3 100644
--- a/pages/options.html
+++ b/pages/options.html
@@ -37,7 +37,7 @@
<td><input/ type="text" class="pattern" placeholder="URL pattern"></td>
<td class="exclusionRulePassKeys"><input/ type="text" class="passKeys" placeholder="Exclude keys"></td>
<td class="exclusionRemoveButton">
- <input/ type="button" tabindex = "-1" class="exclusionRemoveButtonButton" value="&#x2716;"></td>
+ <input/ type="button" class="exclusionRemoveButtonButton" value="&#x2716;"></td>
</tr>
</template>
</div>
diff --git a/pages/popup.html b/pages/popup.html
index 53a75495..b89e2f07 100644
--- a/pages/popup.html
+++ b/pages/popup.html
@@ -67,7 +67,7 @@
<td><input/ type="text" class="pattern" placeholder="URL pattern"></td>
<td class="exclusionRulePassKeys"><input/ type="text" class="passKeys" placeholder="Excluded keys"></td>
<td class="exclusionRemoveButton">
- <input/ type="button" tabindex = "-1" class="exclusionRemoveButtonButton" value="&#x2716;"></td>
+ <input/ type="button" class="exclusionRemoveButtonButton" value="&#x2716;"></td>
</tr>
</template>
</div>