Skip to content
This repository has been archived by the owner on Jul 21, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Apr 1, 2017
1 parent 9a99a06 commit 85255cf
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
15 changes: 9 additions & 6 deletions platform/chromium/vapi-common.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*******************************************************************************
µMatrix - a browser extension to block requests.
Copyright (C) 2014 The µBlock authors
uMatrix - a browser extension to block requests.
Copyright (C) 2014-2017 The uMatrix/uBlock Origin 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
Expand All @@ -21,18 +21,21 @@

// For background page or non-background pages

/* global self */
'use strict';

/******************************************************************************/
/******************************************************************************/

(function() {

'use strict';

/******************************************************************************/

var vAPI = self.vAPI = self.vAPI || {};
// https://bugs.chromium.org/p/project-zero/issues/detail?id=1225&desc=6#c10
if ( !self.vAPI || !self.vAPI.uMatrix ) {
self.vAPI = { uMatrix: true };
}

var vAPI = self.vAPI;
var chrome = self.chrome;

/******************************************************************************/
Expand Down
15 changes: 10 additions & 5 deletions platform/firefox/vapi-common.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*******************************************************************************
µBlock - a browser extension to block requests.
Copyright (C) 2014 The µBlock authors
uMatrix - a browser extension to block requests.
Copyright (C) 2014-2017 The uMatrix/uBlock Origin 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
Expand All @@ -23,20 +23,25 @@

// For background page or non-background pages

'use strict';

/******************************************************************************/

(function() {

'use strict';

/******************************************************************************/

const {Services} = Components.utils.import(
'resource://gre/modules/Services.jsm',
null
);

var vAPI = self.vAPI = self.vAPI || {};
// https://bugs.chromium.org/p/project-zero/issues/detail?id=1225&desc=6#c10
if ( !self.vAPI || !self.vAPI.uMatrix ) {
self.vAPI = { uMatrix: true };
}

var vAPI = self.vAPI;

/******************************************************************************/

Expand Down

0 comments on commit 85255cf

Please sign in to comment.