mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 12:36:37 +02:00
Linted all files.
This commit is contained in:
parent
6c46d28593
commit
0904d8e2a6
6 changed files with 31 additions and 10 deletions
|
@ -1,4 +1,5 @@
|
|||
/* global console,exports */
|
||||
/* jslint moz: true */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -10,6 +11,8 @@ const prefs = preferences.prefs;
|
|||
// Translation
|
||||
var translate = require("sdk/l10n").get;
|
||||
var _ = function(name, replace){
|
||||
"use strict";
|
||||
|
||||
var str = translate(name) || name;
|
||||
if (replace){
|
||||
// replace generic content in the transation by given parameter
|
||||
|
@ -23,7 +26,8 @@ var _ = function(name, replace){
|
|||
|
||||
function checkURL(url, blockMode){
|
||||
"use strict";
|
||||
if (url.protocol === "about:" || url.protocol == "chrome:") {
|
||||
|
||||
if (url.protocol === "about:" || url.protocol === "chrome:") {
|
||||
return "allow";
|
||||
}
|
||||
|
||||
|
@ -35,6 +39,9 @@ function checkURL(url, blockMode){
|
|||
case "block":
|
||||
case "blockContext":
|
||||
case "blockReadout":
|
||||
case "ask":
|
||||
case "askContext":
|
||||
case "askReadout":
|
||||
case "fake":
|
||||
case "fakeContext":
|
||||
case "fakeReadout":
|
||||
|
@ -63,6 +70,8 @@ function checkURL(url, blockMode){
|
|||
|
||||
// Stack parsing
|
||||
function parseStackEntry(entry){
|
||||
"use strict";
|
||||
|
||||
var m = /@(.*):(\d*):(\d*)$/.exec(entry) || ["", entry, "--", "--"];
|
||||
return {
|
||||
url: m[1],
|
||||
|
@ -74,6 +83,8 @@ function parseStackEntry(entry){
|
|||
|
||||
// parse calling stack
|
||||
function errorToCallingStackMsg(error){
|
||||
"use strict";
|
||||
|
||||
var msg = "";
|
||||
var callers = error.stack.trim().split("\n");
|
||||
//console.log(callers);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue