From f149b2e340a34aa7bb70f4cd9ae6f637b55e8bfb Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Mon, 24 Nov 2014 20:20:21 -0200 Subject: [PATCH] jshint --- meta/vapi-appinfo.js | 42 +++++++++++++++++++++++++++++--- platform/chromium/vapi-client.js | 12 ++++++--- platform/chromium/vapi-common.js | 7 +++--- src/js/traffic.js | 7 +++--- 4 files changed, 54 insertions(+), 14 deletions(-) diff --git a/meta/vapi-appinfo.js b/meta/vapi-appinfo.js index f5f7131ab..5d46aa808 100644 --- a/meta/vapi-appinfo.js +++ b/meta/vapi-appinfo.js @@ -1,9 +1,43 @@ -// can be included anywhere if it's needed +/******************************************************************************* + + µBlock - a Chromium browser extension to block requests. + Copyright (C) 2014 The µBlock authors + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see {http://www.gnu.org/licenses/}. + + Home: https://github.com/gorhill/uBlock +*/ + +// Can be included anywhere if it's needed + +/* global self */ + +/******************************************************************************/ + +(function(){ + 'use strict'; +/******************************************************************************/ + self.vAPI = self.vAPI || {}; -vAPI.app = { +self.vAPI.app = { name: 'µBlock', - version: '0.7.0.10' -}; \ No newline at end of file + version: '0.7.0.11' +}; + +/******************************************************************************/ + +})(); \ No newline at end of file diff --git a/platform/chromium/vapi-client.js b/platform/chromium/vapi-client.js index 8fa7b07f8..47edde9a9 100644 --- a/platform/chromium/vapi-client.js +++ b/platform/chromium/vapi-client.js @@ -21,7 +21,7 @@ // For non background pages -/* global self, chrome, vAPI */ +/* global self */ /******************************************************************************/ @@ -32,7 +32,11 @@ /******************************************************************************/ self.vAPI = self.vAPI || {}; -self.vAPI.chrome = true; + +var chrome = self.chrome; +var vAPI = self.vAPI; + +vAPI.chrome = true; /******************************************************************************/ @@ -81,7 +85,7 @@ var uniqueId = function() { /******************************************************************************/ -self.vAPI.messaging = { +vAPI.messaging = { port: null, channels: {}, listeners: {}, @@ -140,7 +144,7 @@ self.vAPI.messaging = { /******************************************************************************/ -self.vAPI.canExecuteContentScript = function() { +vAPI.canExecuteContentScript = function() { return true; }; diff --git a/platform/chromium/vapi-common.js b/platform/chromium/vapi-common.js index cce22b22a..81667dbfa 100644 --- a/platform/chromium/vapi-common.js +++ b/platform/chromium/vapi-common.js @@ -21,7 +21,7 @@ // For background page or non-background pages -/* global self, vAPI */ +/* global self */ /******************************************************************************/ @@ -31,6 +31,9 @@ self.vAPI = self.vAPI || {}; +var chrome = self.chrome; +var vAPI = self.vAPI; + /******************************************************************************/ // http://www.w3.org/International/questions/qa-scripts#directions @@ -70,8 +73,6 @@ vAPI.download = function(details) { /******************************************************************************/ -var chrome = self.chrome; - vAPI.getURL = function(path) { return chrome.runtime.getURL(path); }; diff --git a/src/js/traffic.js b/src/js/traffic.js index ef65865ba..34769a0d6 100644 --- a/src/js/traffic.js +++ b/src/js/traffic.js @@ -19,8 +19,7 @@ Home: https://github.com/gorhill/uBlock */ -/* global µBlock */ -'use strict'; +/* global µBlock, vAPI */ /******************************************************************************/ @@ -28,6 +27,8 @@ µBlock.webRequest = (function() { +'use strict'; + /******************************************************************************/ // Intercept and filter web requests. @@ -334,7 +335,7 @@ vAPI.net.onHeadersReceived = { vAPI.net.registerListeners(); -console.log('µBlock> Beginning to intercept net requests at %s', (new Date()).toISOString()); +//console.log('µBlock> Beginning to intercept net requests at %s', (new Date()).toISOString()); /******************************************************************************/