mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-22 01:25:48 +01:00
Use builtin String.startsWith, String.endsWith, and String.contains methods where appropriate.
This commit is contained in:
@@ -1152,7 +1152,7 @@ var Buffer = Module("Buffer", {
|
||||
else {
|
||||
let url = loc || doc.location.href;
|
||||
const PREFIX = "view-source:";
|
||||
if (url.indexOf(PREFIX) == 0)
|
||||
if (url.startsWith(PREFIX))
|
||||
url = url.substr(PREFIX.length);
|
||||
else
|
||||
url = PREFIX + url;
|
||||
|
||||
Reference in New Issue
Block a user