1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-07 01:54:12 +01:00

Use builtin String.startsWith, String.endsWith, and String.contains methods where appropriate.

This commit is contained in:
Kris Maglione
2014-02-22 15:17:08 -08:00
parent 6790c62c41
commit 51eb03c376
19 changed files with 40 additions and 39 deletions

View File

@@ -325,7 +325,7 @@ var Help = Module("Help", {
}
if (name == "href") {
value = node.href || value;
if (value.indexOf("dactyl://help-tag/") == 0) {
if (value.startsWith("dactyl://help-tag/")) {
try {
let uri = services.io.newChannel(value, null, null).originalURI;
value = uri.spec == value ? "javascript:;" : uri.path.substr(1);