https://github.com/abhijithvijayan/google-ima.js
https://github.com/abhijithvijayan/google-ima.js
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/abhijithvijayan/google-ima.js
- Owner: abhijithvijayan
- License: mit
- Created: 2024-03-01T10:10:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-01T10:36:22.000Z (over 1 year ago)
- Last Synced: 2024-10-05T19:22:03.997Z (9 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: license
Awesome Lists containing this project
README
google-ima.js
🙋♂️ Made by @abhijithvijayan
A drop in replacement for [Google's Interactive Media Ads](https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side) library for preventing websites crashing if Adblocker is enabled.
❤️ it? ⭐️ it on [GitHub](https://github.com/abhijithvijayan/google-ima.js/stargazers) or [Tweet](https://twitter.com/intent/tweet?text=Check%20out%20google-ima.js%21%20by%20%40_abhijithv%0A%0AA%20drop%20in%20replacement%20for%20Google%27s%20Interactive%20Media%20Ads%20library%20for%20preventing%20websites%20crashing%20if%20Adblocker%20is%20enabled.%0Ahttps%3A%2F%2Fgithub.com%2Fabhijithvijayan%2Fgoogle-ima.js%0A%0A%23google%20%23ima%20%23javascript) about it.
## Table of Contents
- [Usage](#usage)
- [FAQs](#faqs)
- [Issues](#issues)
- [🐛 Bugs](#-bugs)
- [LICENSE](#license)## Usage
Inject the script into the page and you are done.
> **paste in console or use extensions that inject scripts**
```js
(() => {
var sdk = "https://raw.githubusercontent.com/abhijithvijayan/google-ima.js/main/sdk.js";
var scriptToInject = document.createElement("script");
// use any proxy, eg: `https://corsproxy.io/?`
var scriptSrcURL = 'https://api.codetabs.com/v1/proxy/?quest=' + encodeURIComponent(sdk);fetch(scriptSrcURL).then((res) => res.text()).then((code) => {
scriptToInject.append(code);
document.body.append(scriptToInject);
})
})();
```
## FAQs
### 1. What is the purpose of this dumb sdk mirror that does nothing?
I personally ran into issue with https://www.fancode.com crashing when SDK failed to load through my ad blocker dns resolver. I didn't want to solve it by whitelisting the domain which would've defeated the purpose of ad blocker. So this dumb SDK acted like a proxy for the website scripts which prevented it from crashing.
## Issues
_Looking to contribute? Look for the [Good First Issue](https://github.com/abhijithvijayan/google-ima.js/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22good+first+issue%22)
label._### 🐛 Bugs
Please file an issue [here](https://github.com/abhijithvijayan/google-ima.js/issues/new) for bugs, missing documentation, or unexpected behavior.
[**See Bugs**](https://github.com/abhijithvijayan/google-ima.js/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22type%3A+bug%22)
## License
MIT © [Abhijith Vijayan](https://abhijithvijayan.in)