[Pkg-mozext-commits] [firebug] 05/15: Remove usages of String.prototype.contains
David Prévot
taffit at moszumanska.debian.org
Sat Dec 13 20:08:28 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository firebug.
commit dd00eb28aeea1ad7687b1cbeb7b0a2d6d7d16537
Author: Simon Lindholm <simon.lindholm10 at gmail.com>
Date: Mon Nov 24 11:45:31 2014 +0100
Remove usages of String.prototype.contains
Deprecated and to be replaced by String.prototype.includes in the
future.
---
extension/content/firebug/css/cssModule.js | 2 +-
extension/content/firebug/lib/url.js | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/extension/content/firebug/css/cssModule.js b/extension/content/firebug/css/cssModule.js
index ef53f72..466644e 100644
--- a/extension/content/firebug/css/cssModule.js
+++ b/extension/content/firebug/css/cssModule.js
@@ -288,7 +288,7 @@ Firebug.CSSModule = Obj.extend(Module, Firebug.EditorSelector,
if (!type)
{
- if (m[11] && m[11].contains("gradient"))
+ if (m[11] && m[11].indexOf("gradient") !== -1)
{
var arg = value.substr(m[0].length).match(/\((?:(?:[^\(\)]*)|(?:\(.*?\)))+\)/);
if (!arg)
diff --git a/extension/content/firebug/lib/url.js b/extension/content/firebug/lib/url.js
index d3b9053..0fbb6ee 100644
--- a/extension/content/firebug/lib/url.js
+++ b/extension/content/firebug/lib/url.js
@@ -418,14 +418,14 @@ Url.normalizeURL = function(url)
return url;
// Normalize path traversals (a/b/../c -> a/c).
- while (url.contains("/../") && url[0] != "/")
+ while (url.indexOf("/../") !== -1 && url[0] != "/")
url = url.replace(/[^\/]+\/\.\.\//g, "");
// Issue 1496, avoid #
url = url.replace(/#.*/, "");
// For script tags inserted dynamically sometimes the script.fileName is bogus
- if (url.contains("->"))
+ if (url.indexOf("->") !== -1)
url = url.replace(/[^\s]*\s->\s/, "");
if (url.startsWith("chrome:"))
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firebug.git
More information about the Pkg-mozext-commits
mailing list