Paper on "Application of deep and reinforcement learning to boundary control problems"

Recently, I wrote a paper based on my master thesis project, which I had attempted to submit to AAAI conference. However, the attempt was futile as the reviewers did not really like it. It was quite interesting to see that at least some of the comments by the reviewers are contradictory with each other; it looks like I am not the only one who is lazy to read. Anyway, I decided to make it available for the public via arXiv and viXra. The following are the links to the same. https://arxiv.org/abs/2310.15191 https://vixra.org/abs/2310.0118 Originally, I had only planned on submitting this to arXiv. When I checked the submission portal a couple of hours after the scheduled publishing time, I saw that the article was put "On Hold" from being published. I searched for the reasons for the same, and I read in a few places that sometimes arXiv takes a lot of time to publish them once put on hold, and sometimes they just don't publish them at all. Therefore, I decided to submit it

How to Create your own Ad Blocker Chrome Extension

Not very long ago, I read an article stating that Google banned advertisement blockers from its stores. There are several websites which does not let you in if you have an Ad blocker extension installed on your browser. I have not investigated on how these websites detect that, nor do I know whether our own version of advertisement blocker would be immune to that. But, isn't it fun to build something like this on our own?

As the first step, I found a random website that has a Google Ad. I right clicked on the Google Ad and clicked on Inspect button.


As I moved up the Elements inspector, I found that the id of the advertisement starts with "google_ads_". Therefore, I opened the console and typed in the following command:
div = document.querySelector('[id^="google_ads_"]')
This selected the div that contained the advertisement. I went ahead and typed in the following command that would remove the div from the page.

div.parentElement.removeChild(div)



In a similar fashion, one can find different patterns in which different advertisements are found. I also found that many-a-times using "google_" instead of "google_ads_" is better. In order to select all the elements that have ids of matching type, let us use querySelectorAll in place of querySelector and use forEach to iterate over all elements.

Let us add these into a Chrome Extension to automate the process. Follow the following procedure for the same:
  1. Create a new folder named adBlocker.
  2. Create two files named 'manifest.json' and 'background.js' respectively.
  3. Insert the following content in manifest.json file:
    {
    "name": "Ad Blocker",
    "description": "Make ads disappear",
    "version": "2.0",
    "permissions": [
    "activeTab"
    ],
    "background": {
    "scripts": ["background.js"],
    "persistent": false
    },
    "browser_action": {
    "default_title": "Make ads disappear"
    },
    "manifest_version": 2
    }
  4. Insert the following content in the background.js file:
    chrome.browserAction.onClicked.addListener(function(tab) {
    chrome.tabs.executeScript({
    code: `

    var divs = document.querySelectorAll('[id^="google_"]');
    divs.forEach(function(div){
    div.parentElement.removeChild(div);
    });

    `;
    });
    });
  5. Open chrome and type in chrome://extensions as URL.
  6. Click to enable Developer Mode, if not already enabled.
  7. Click on Load Unpacked Extension and navigate to the adblocker folder.
  8. Enable the newly loaded extension.


Now whenever you click on the extension, the advertisements of this type disappears. You can follow a similar procedure and create an extension that can remove all kinds of advertisements that are bothering you.


Comments

Popular posts from this blog

Bought a new domain - chickfort.com

Started a blog under HexHoot

Created a video to help people get started with HexHoot