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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user