mirror of
https://github.com/gorhill/uMatrix.git
synced 2024-09-30 09:06:56 +13:00
Implement vAPI.insertHTML
The purpose of this API is basically to satisfy AMO reviewers in the future, since the use of innerHTML with variables (i.e., not plain text) will be rejected without any questions. Since this is not a problem for browsers other than Firefox, they will use simple innerHTML assignment, however safe-parsing could be implemented for them too.
This commit is contained in:
parent
6151b10bd8
commit
09d605fa04
1 changed files with 4 additions and 3 deletions
|
@ -42,7 +42,7 @@ vAPI.firefox = true;
|
||||||
// TODO: read these data from somewhere...
|
// TODO: read these data from somewhere...
|
||||||
vAPI.app = {
|
vAPI.app = {
|
||||||
name: 'µBlock',
|
name: 'µBlock',
|
||||||
version: '0.8.5.0'
|
version: '0.8.5.3'
|
||||||
};
|
};
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
@ -59,7 +59,7 @@ vAPI.app.restart = function() {
|
||||||
// List of things that needs to be destroyed when disabling the extension
|
// List of things that needs to be destroyed when disabling the extension
|
||||||
// Only functions should be added to it
|
// Only functions should be added to it
|
||||||
|
|
||||||
cleanupTasks = [];
|
var cleanupTasks = [];
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
|
@ -1212,8 +1212,9 @@ vAPI.toolbarButton.onBeforeCreated = function(doc) {
|
||||||
var resizePopup = function() {
|
var resizePopup = function() {
|
||||||
var body = iframe.contentDocument.body;
|
var body = iframe.contentDocument.body;
|
||||||
panel.parentNode.style.maxWidth = 'none';
|
panel.parentNode.style.maxWidth = 'none';
|
||||||
panel.style.width = iframe.style.width = body.clientWidth + 'px';
|
// Set the hegiht first, then the width for proper resising
|
||||||
panel.style.height = iframe.style.height = body.clientHeight + 'px';
|
panel.style.height = iframe.style.height = body.clientHeight + 'px';
|
||||||
|
panel.style.width = iframe.style.width = body.clientWidth + 'px';
|
||||||
updateTimer = null;
|
updateTimer = null;
|
||||||
};
|
};
|
||||||
var onPopupReady = function() {
|
var onPopupReady = function() {
|
||||||
|
|
Loading…
Reference in a new issue