From 037bdca6d6ee36e3fa8c7f4df83c1d23f92d7dd7 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sat, 5 Mar 2016 14:59:01 -0500 Subject: [PATCH] commented code for the addon reviewers --- src/js/contentscript-end.js | 4 ++++ src/js/contentscript-start.js | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/js/contentscript-end.js b/src/js/contentscript-end.js index fe0b5073f..4fae8d148 100644 --- a/src/js/contentscript-end.js +++ b/src/js/contentscript-end.js @@ -231,6 +231,10 @@ var uBlockCollapser = (function() { var primeLocalIFrame = function(iframe) { // Should probably also copy injected styles. + // The injected scripts are those which were injected in the current + // document, from within the `contentscript-start.js / injectScripts`, + // and which scripts are selectively looked-up from: + // https://github.com/gorhill/uBlock/blob/master/assets/ublock/resources.txt if ( vAPI.injectedScripts ) { var scriptTag = document.createElement('script'); scriptTag.appendChild(document.createTextNode(vAPI.injectedScripts)); diff --git a/src/js/contentscript-start.js b/src/js/contentscript-start.js index 3bb2d94bd..68ad3bf80 100644 --- a/src/js/contentscript-start.js +++ b/src/js/contentscript-start.js @@ -124,8 +124,10 @@ var netFilters = function(details) { // Create script tags and assign data URIs looked up from our library of // redirection resources: Sometimes it is useful to use these resources as -// standalone scriptlets. -// Library of redirection resources: +// standalone scriptlets. These scriptlets are injected from within the +// content scripts because what must be injected, if anything, depends on the +// currently active filters, as selected by the user. +// Library of redirection resources is located at: // https://github.com/gorhill/uBlock/blob/master/assets/ublock/resources.txt var injectScripts = function(scripts) {