var plock = {
    iframes : {},
    init: function () {
        this.iframeRefresh(function (){
            chrome.runtime.sendMessage({type: "contentReady", params: {}})
        });
    },
    iframeRefresh: function(callback) {
        var iframes = document.getElementsByTagName("iframe");
        for (var i=0; i<iframes.length; i++) {
            var src = iframes[i].getAttribute('src')
            if (src != undefined && src.length > 0) {
                if (src.indexOf("?") == -1 && src.substr(src.length-1, src.length) != "/") src += "/"
                plock.iframes[src] = iframes[i];
            }
        }
        if (callback != undefined) {
            callback();
        }
    },
    removeIframe: function(params, retry) {
        if (params.link != undefined && params.link.length > 0) {
            var iframe = plock.iframes[params.link];
            if (iframe != undefined && iframe.parentNode != undefined) {
                iframe.parentNode.removeChild(iframe);
            } else if (retry) {
                this.iframeRefresh();
                window.setTimeout(function(){
                    plock.removeIframe(params, false);
                }, 1000);
            }
        }
    }
}

plock.init();

chrome.runtime.onMessage.addListener(
    function(request, sender, sendResponse) {
        if (request.type == "linkPlocked") {
            plock.removeIframe(request.params, true);
        }
    }
);


@@ -11,22 +11,23 @@
 = %7B%0A    
-iframe
+element
 s : %7B%7D,%0A
@@ -55,38 +55,40 @@
  %7B%0A        this.
-iframe
+elements
 Refresh(function
@@ -190,22 +190,24 @@
  %7D,%0A    
-iframe
+elements
 Refresh:
@@ -240,22 +240,23 @@
     var 
-iframe
+element
 s = docu
@@ -316,22 +316,23 @@
  i=0; i%3C
-iframe
+element
 s.length
@@ -362,22 +362,23 @@
 r src = 
-iframe
+element
 s%5Bi%5D.get
@@ -576,29 +576,425 @@
 ock.
-iframes%5Bsrc%5D = iframe
+elements%5Bsrc%5D = elements%5Bi%5D;%0A            %7D%0A        %7D%0A        var elements = document.getElementsByTagName(%22img%22);%0A        for (var i=0; i%3Celements.length; i++) %7B%0A            var src = elements%5Bi%5D.getAttribute('src')%0A            if (src != undefined && src.length %3E 0) %7B%0A                if (src.indexOf(%22?%22) == -1 && src.substr(src.length-1, src.length) != %22/%22) src += %22/%22%0A                plock.elements%5Bsrc%5D = element
 s%5Bi%5D
@@ -1107,22 +1107,23 @@
   remove
-Iframe
+Element
 : functi
@@ -1224,22 +1224,18 @@
     var 
-ifram
 e
+l
  = plock
@@ -1235,22 +1235,23 @@
 = plock.
-iframe
+element
 s%5Bparams
@@ -1274,22 +1274,18 @@
     if (
-ifram
 e
+l
  != unde
@@ -1293,22 +1293,18 @@
 ined && 
-ifram
 e
+l
 .parentN
@@ -1339,22 +1339,18 @@
         
-ifram
 e
+l
 .parentN
@@ -1365,22 +1365,18 @@
 veChild(
-ifram
 e
+l
 );%0A     
@@ -1423,22 +1423,24 @@
    this.
-iframe
+elements
 Refresh(
@@ -1520,22 +1520,23 @@
 k.remove
-Iframe
+Element
 (params,
@@ -1775,14 +1775,15 @@
 move
-Iframe
+Element
 (req

manage img element