Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown code on my site - Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 #1188

Open
datalocks opened this issue Mar 20, 2023 · 1 comment
Assignees

Comments

@datalocks
Copy link

The following code is on my clients website and is causing an iFrame with 'NF' to appear at the top of one of our pages. What is this code and what is it supposed to do?
I am unsure where this code has been added to the site as well, i have checked website source code and GTM.


(function() {
    /*

 Copyright The Closure Library Authors.
 SPDX-License-Identifier: Apache-2.0
*/
    'use strict';
    var e = class {
        constructor(c) {
            this.g = d;
            this.h = c;
            this.g.document.addEventListener("__TAG_ASSISTANT_API_MESSAGE", b=>{
                b = b.detail;
                var a;
                if (a = this.receiver) {
                    a: if (a = null === b || void 0 === b ? void 0 : b.type,
                    "string" !== typeof a)
                        a = !1;
                    else
                        switch (a) {
                        case "PIPE_MESSAGE":
                        case "DISCONNECT":
                        case "API_INSTALLED":
                        case "WINDOWS_CLOSED":
                            a = !0;
                            break a;
                        default:
                            a = !1
                        }
                    if (a)
                        a: if (a = null === b || void 0 === b ? void 0 : b.source,
                        "string" !== typeof a)
                            a = !1;
                        else
                            switch (a) {
                            case "PAGE":
                            case "EXTENSION":
                                a = !0;
                                break a;
                            default:
                                a = !1
                            }
                }
                a && "PIPE_MESSAGE" === b.type && "EXTENSION" === b.source && this.receiver(b.data, b.origin)
            }
            );
            this.g.document.dispatchEvent(new CustomEvent("__TAG_ASSISTANT_API_MESSAGE",{
                detail: {
                    type: "API_INSTALLED",
                    source: "PAGE"
                }
            }))
        }
        setReceiver(c) {
            this.receiver = c
        }
        sendMessage(c) {
            this.g.document.dispatchEvent(new CustomEvent("__TAG_ASSISTANT_API_MESSAGE",{
                detail: {
                    type: "PIPE_MESSAGE",
                    source: "PAGE",
                    data: c,
                    origin: this.g.origin
                }
            }))
        }
        disconnect() {
            this.g.document.dispatchEvent(new CustomEvent("__TAG_ASSISTANT_API_MESSAGE",{
                detail: {
                    type: "DISCONNECT",
                    source: "PAGE"
                }
            }));
            this.h()
        }
    }
    ;
    const d = window;
    d.__TAG_ASSISTANT_API = d.__TAG_ASSISTANT_API || new e(()=>{
        d.__TAG_ASSISTANT_API = void 0
    }
    );
}
).call(this);

@12wrigja
Copy link
Collaborator

https://chrome.google.com/webstore/detail/tag-assistant-companion/jmekfmbnaedfebfnmakmokmlfpblbfdm

Do you have the Tag Assistant companion extension installed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants