Globe Telecom injecting JavaScript on 3G

July 24 2013 ·

So I recently redesigned my blog. While redesigning it, I was loading it up on my laptop, iPhone, and iPad through WiFi. It looked (subjectively) good.

I was trying out my site again yesterday on my iPhone and scrolled to the bottom. I noticed the footer had too much space below it for some reason. I thought, okay something to fix when I get home. Here's what it looked like: on Globe 3G

When I got home, I loaded up the page again on my iPhone and took a look. Surprisingly the excessive white space wasn't there. That's when I realized that I was looking at it while I was using Globe Telecom's 3G. Loading it up again, I confirmed it was different on 3G vs. on my home DSL via WiFi. Here's how it looked at home: on WiFi

So I loaded it on my laptop via tethering and looked at what was being added to my site. The code added was:

<!-- Layer8 version --><script>if(top==window){var fns=document.createElement("script");fns.setAttribute("src","");fns.setAttribute("id","fn_statistics_manager"); var fn_selector_insertion_script="";runFnTbScript = function(){try{var tbInsertion = new FNH.TBInsertion();var tbData = "PFRCRGF0YT48VEJEYXRhSXRlbSBuYW1lPSJob3N0X3VybCIgdmFsdWU9Imh0dHA6Ly90aGVwb2NoLmNvbS8iID48L1RCRGF0YUl0ZW0+PFRCRGF0YUl0ZW0gbmFtZT0iaW5zZXJ0aW9uIiB2YWx1ZT0iaHR0cDovL3Rvb2xiYXIubXl3ZWJhY2NlbGVyYXRpb24uY29tL3NvdXJjZXMvaW5mcmEvanMvaW5zZXJ0aW9uX3BjLmpzIiBjb25maWd1cmF0aW9uPSJ0cnVlIiA+PC9UQkRhdGFJdGVtPjwvVEJEYXRhPg==";tbInsertion.parseTBData(tbData);var fnLayer8=tbInsertion.createIframeElement("fn_layer8", "");var owner;if(document.body){owner=document.body;}else{owner=document.hdocumentElement;}var shouldAddDiv=tbInsertion.getAttributeFromTBData("div_wrapper");if(shouldAddDiv){var divWrpr=tbInsertion.createElement("div", "fn_wrapper_div");"fixed";divWrpr.ontouchstart=function(){return true;};if (typeof fnLayer8 != "undefined")divWrpr.appendChild(fnLayer8);owner.appendChild(divWrpr);}else{if (typeof fnLayer8 != "undefined")owner.appendChild(fnLayer8);}var result=tbInsertion.getAttributeFromTBData("insertion");if(result){scriptLocation=result;}else{scriptLocation=""}var fnd=document.createElement("script");fnd.setAttribute("src",scriptLocation);fnd.setAttribute("id","fn_toolbar_script");fnd.setAttribute("toolbardata",tbData);fnd.setAttribute("toolbarhash","dXbUsIrleKl47BWqDA7Sdw==");fnd.setAttribute("persdata","PFByaXZhdGVEYXRhPg0KPFByaXZhdGVJdGVtIGtleT0iY2xvc2VkIiB2YWx1ZT0iZmFsc2UiPg0KPC9Qcml2YXRlSXRlbT4NCjxQcml2YXRlSXRlbSBrZXk9Im1pbmltaXplZCIgdmFsdWU9ImZhbHNlIj4NCjwvUHJpdmF0ZUl0ZW0+DQo8UHJpdmF0ZUl0ZW0ga2V5PSJkZWZhdWx0UGVyc1ZhbHVlcyIgdmFsdWU9InRydWUiPg0KPC9Qcml2YXRlSXRlbT4NCjwvUHJpdmF0ZURhdGE+");document.body.appendChild(fnd);}catch(e){console.error("TB preload script failed: " + e);}};var fne=document.createElement("script");fne.setAttribute("src",fn_selector_insertion_script);fne.setAttribute("id","fn_selector_insertion_script");if(fne.addEventListener){fne.onload = runFnTbScript;}else {fne.onreadystatechange = function(){if ((this.readyState == "complete") || (this.readyState == "loaded")) runFnTbScript();}};if(document.head==null || document.head=="undefined" ){document.head = document.getElementsByTagName("head")[0];}document.head.appendChild(fne); document.head.appendChild(fns)};</script>

Here's the code cleaned up:

<!-- Layer8 version -->
if (top == window) {
    var fns = document.createElement("script");
    fns.setAttribute("src", "");
    fns.setAttribute("id", "fn_statistics_manager");
    var fn_selector_insertion_script = "";
    runFnTbScript = function () {
        try {
            var tbInsertion = new FNH.TBInsertion();
            var tbData = "PFRCRGF0YT48VEJEYXRhSXRlbSBuYW1lPSJob3N0X3VybCIgdmFsdWU9Imh0dHA6Ly90aGVwb2NoLmNvbS8iID48L1RCRGF0YUl0ZW0+PFRCRGF0YUl0ZW0gbmFtZT0iaW5zZXJ0aW9uIiB2YWx1ZT0iaHR0cDovL3Rvb2xiYXIubXl3ZWJhY2NlbGVyYXRpb24uY29tL3NvdXJjZXMvaW5mcmEvanMvaW5zZXJ0aW9uX3BjLmpzIiBjb25maWd1cmF0aW9uPSJ0cnVlIiA+PC9UQkRhdGFJdGVtPjwvVEJEYXRhPg==";
            var fnLayer8 = tbInsertion.createIframeElement("fn_layer8", "");
            var owner;
            if (document.body) {
                owner = document.body;
            } else {
                owner = document.hdocumentElement;
            var shouldAddDiv = tbInsertion.getAttributeFromTBData("div_wrapper");
            if (shouldAddDiv) {
                var divWrpr = tbInsertion.createElement("div", "fn_wrapper_div");
       = "fixed";
                divWrpr.ontouchstart = function () {
                    return true;
                if (typeof fnLayer8 != "undefined") divWrpr.appendChild(fnLayer8);
            } else {
                if (typeof fnLayer8 != "undefined") owner.appendChild(fnLayer8);
            var result = tbInsertion.getAttributeFromTBData("insertion");
            if (result) {
                scriptLocation = result;
            } else {
                scriptLocation = ""
            var fnd = document.createElement("script");
            fnd.setAttribute("src", scriptLocation);
            fnd.setAttribute("id", "fn_toolbar_script");
            fnd.setAttribute("toolbardata", tbData);
            fnd.setAttribute("toolbarhash", "dXbUsIrleKl47BWqDA7Sdw==");
            fnd.setAttribute("persdata", "PFByaXZhdGVEYXRhPg0KPFByaXZhdGVJdGVtIGtleT0iY2xvc2VkIiB2YWx1ZT0iZmFsc2UiPg0KPC9Qcml2YXRlSXRlbT4NCjxQcml2YXRlSXRlbSBrZXk9Im1pbmltaXplZCIgdmFsdWU9ImZhbHNlIj4NCjwvUHJpdmF0ZUl0ZW0+DQo8UHJpdmF0ZUl0ZW0ga2V5PSJkZWZhdWx0UGVyc1ZhbHVlcyIgdmFsdWU9InRydWUiPg0KPC9Qcml2YXRlSXRlbT4NCjwvUHJpdmF0ZURhdGE+");
        } catch (e) {
            console.error("TB preload script failed: " + e);
    var fne = document.createElement("script");
    fne.setAttribute("src", fn_selector_insertion_script);
    fne.setAttribute("id", "fn_selector_insertion_script");
    if (fne.addEventListener) {
        fne.onload = runFnTbScript;
    } else {
        fne.onreadystatechange = function () {
            if ((this.readyState == "complete") || (this.readyState == "loaded")) runFnTbScript();
    }; if (document.head == null || document.head == "undefined") {
        document.head = document.getElementsByTagName("head")[0];

Apparently, based on the following sites:

Globe Telecom is adding some sort of toolbar on websites for those using their data connection. Based on the second link, the whole fucked up idea was scrapped. But Globe Telecom is apparently still adding a bunch of code onto my site, and also ruining my layout by adding a lot of white space, but isn't showing the toolbar.

So here's what I'd like to know:

  1. Is Globe Telecom still showing the toolbar or not? Because I'm not seeing it.
  2. If they are no longer showing the toolbar, why are they still injecting code onto websites?
  3. If they are still showing the toolbar, could you stop it? We're paying for your goddam poor service. The least you can do is not fuck with how we use it.
  4. Who actually decided this was a good idea? Because: fuck you.

Globe Telecom, you're already considered a very poor service provider. Here's what you have to do about this:

  1. Disable the software that's injecting code and stop it.
  2. Fire whoever thought up the whole scheme.


Update: What Globe Telecom is adding is what they call iToolbar. It's basically an opportunity for them to track what you do, and inject ads into the sites you go to. Their FAQ ( states the following:

  • Q: 25. Will the Tattoo Toolbar push unwarranted advertising?
  • A: Tattoo Toolbar will not push unwarranted advertising and promotional offers that are not intended to benefit your current online experience.

So what the fuck is your definition of "unwarranted advertising" Globe? Someone who didn't pay you for the ad space? Also, your injected ads will never "benefit" anyone's "online experience".

And apparently I am not the only one to notice:

Update 2: Suddenly getting a lot of readers today, September 24, 2013. Here's a follow up post I made on this:

Category: Blog
Tags: Globe Telecom, JavaScript, Injection, Security