[Pkg-mozext-commits] [tabmixplus] 37/73: Enable Eslint 'no-useless-escape'
David Prévot
taffit at moszumanska.debian.org
Mon May 9 02:30:53 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit b68d353972b9eb5838822f62ffabcea47a1c58b9
Author: onemen <tabmix.onemen at gmail.com>
Date: Mon Apr 4 19:07:40 2016 +0300
Enable Eslint 'no-useless-escape'
---
.eslintrc.js | 2 +-
chrome/content/minit/minit.js | 2 +-
chrome/content/session/promptservice.js | 6 +++---
chrome/content/session/sessionStore.js | 3 ++-
defaults/preferences/tabmix.js | 2 +-
modules/ContentClick.jsm | 4 ++--
modules/log.jsm | 2 +-
7 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/.eslintrc.js b/.eslintrc.js
index d185830..ce1af3f 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -133,7 +133,7 @@ module.exports = {
"no-useless-call": 2,
"no-useless-concat": 2,
"no-useless-constructor": 2,
- "no-useless-escape": 0,
+ "no-useless-escape": 2,
"no-void": 0,
"no-var": 0,
"no-warning-comments": [0, { "terms": ["todo", "fixme", "xxx"], "location": "start" }],
diff --git a/chrome/content/minit/minit.js b/chrome/content/minit/minit.js
index 9e7b979..5890128 100644
--- a/chrome/content/minit/minit.js
+++ b/chrome/content/minit/minit.js
@@ -53,7 +53,7 @@ var TMP_tabDNDObserver = {
'let halfWidth = boxObject.width / 2;\n ' +
'screenX += draggingRight * halfWidth;'
)._replace(
- /screenX \+ boxObject.* \< tabCenter/,
+ /screenX \+ boxObject.* < tabCenter/,
'screenX + halfWidth < tabCenter'
)._replace(
'newIndex >= oldIndex',
diff --git a/chrome/content/session/promptservice.js b/chrome/content/session/promptservice.js
index e47ed0c..67fa88c 100644
--- a/chrome/content/session/promptservice.js
+++ b/chrome/content/session/promptservice.js
@@ -163,16 +163,16 @@ function prompt_extra1(button) {
// copy from commonDialog.js
function setLabelForNode(aNode, aLabel, aIsLabelFlag) {
var accessKey = null;
- if (/ *\(\&([^&])\)(:?)$/.test(aLabel)) {
+ if (/ *\(&([^&])\)(:?)$/.test(aLabel)) {
aLabel = RegExp.leftContext + RegExp.$2;
accessKey = RegExp.$1;
- } else if (/^([^&]*)\&(([^&]).*$)/.test(aLabel)) {
+ } else if (/^([^&]*)&(([^&]).*$)/.test(aLabel)) {
aLabel = RegExp.$1 + RegExp.$2;
accessKey = RegExp.$3;
}
// && is the magic sequence to embed an & in your label.
- aLabel = aLabel.replace(/\&\&/g, "&");
+ aLabel = aLabel.replace(/&&/g, "&");
if (aIsLabelFlag) { // Set text for <label> element
aNode.setAttribute("value", aLabel);
} else { // Set text for other xul elements
diff --git a/chrome/content/session/sessionStore.js b/chrome/content/session/sessionStore.js
index 6a17d32..41e3a06 100644
--- a/chrome/content/session/sessionStore.js
+++ b/chrome/content/session/sessionStore.js
@@ -352,7 +352,8 @@ var TMP_ClosedTabs = {
if (_uri.scheme == "about" && title === "")
url = title = "about:blank";
else try {
- url = _uri.scheme + ":\/\/" + _uri.hostPort + _uri.path;
+ url = _uri.scheme == "about" ? _uri.spec :
+ _uri.scheme + "://" + _uri.hostPort + _uri.path;
} catch (e) {
url = title;
}
diff --git a/defaults/preferences/tabmix.js b/defaults/preferences/tabmix.js
index d9ad983..ee601d5 100644
--- a/defaults/preferences/tabmix.js
+++ b/defaults/preferences/tabmix.js
@@ -223,7 +223,7 @@ pref("extensions.tabmix.middleclickDelete", true);
pref("extensions.tabmix.optionsToolMenu", true);
pref("extensions.tabmix.enablefiletype", true);
-pref("extensions.tabmix.filetype", "xpi zip rar exe tar jar gzip gz ace bin doc docx xls xlsx mdb ppt iso 7z cab arj lzh uue torrent /&disp=attd&/ php\?attachmentid=.* php\?act=Attach&type=post&id=.* /download.php\?*/");
+pref("extensions.tabmix.filetype", "xpi zip rar exe tar jar gzip gz ace bin doc docx xls xlsx mdb ppt iso 7z cab arj lzh uue torrent /&disp=attd&/ /php?attachmentid=.*/ /php?act=Attach&type=post&id=.*/ /download.php?*/");
pref("extensions.{dc572301-7619-498c-a57d-39143191b318}.description", "chrome://tabmixplus/locale/tabmix.properties");
diff --git a/modules/ContentClick.jsm b/modules/ContentClick.jsm
index eeedba3..93a000b 100644
--- a/modules/ContentClick.jsm
+++ b/modules/ContentClick.jsm
@@ -308,7 +308,7 @@ ContentClickInternal = {
* Get current page url
* if user click a link while the page is reloading node.ownerDocument.location can be null
*/
- let youtube = /www\.youtube\.com\/watch\?v\=/;
+ let youtube = /www\.youtube\.com\/watch\?v=/;
let curpage = this.currentURL;
if (!youtube.test(curpage)) {
let node = this.wrappedNode || this.wrappedOnClickNode;
@@ -896,7 +896,7 @@ ContentClickInternal = {
return false;
let current = this._data.currentURL.toLowerCase();
- let youtube = /www\.youtube\.com\/watch\?v\=/;
+ let youtube = /www\.youtube\.com\/watch\?v=/;
let isYoutube = _href => youtube.test(current) && youtube.test(_href);
let isSamePath = (_href, att) => makeURI(current).path.split(att)[0] == makeURI(_href).path.split(att)[0];
let isSame = (_href, att) => current.split(att)[0] == _href.split(att)[0];
diff --git a/modules/log.jsm b/modules/log.jsm
index 5a96cb1..f5c7f52 100644
--- a/modules/log.jsm
+++ b/modules/log.jsm
@@ -201,7 +201,7 @@ options = {
let val = aObj[prop];
let type = typeof val;
if (type == "string")
- val = "\'" + val + "\'";
+ val = "'" + val + "'";
if (type == "function" && typeof level == "string") {
val = val.toString();
let code = val.toString().indexOf("native code") > -1 ?
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git
More information about the Pkg-mozext-commits
mailing list