dhowe / adlipo Goto Github PK
View Code? Open in Web Editor NEWReplacing ads with generative language
Home Page: https://rednoise.org/adlipo
Replacing ads with generative language
Home Page: https://rednoise.org/adlipo
Need to find a way to merge the newest UBO into this repo (every few weeks/months)
happens when using the "hide this element" button in the right-click menu
The goal is to create 3-5 examples of AdLiPo [climate] on actual webpages. I've included some examples from basic AdLipo below. The best ones are when there is some relationship between the page content and the ad. This is just for a slideshow, so fine to use photoshop or similar to mockup, ideally with the new formatting (as in the first image below). Each example should show 1 or 2 adlipo ads, not more.
Use the text below with any of the collected images in climate/images
-- you may need to crop the images as most are not the correct resolution (perhaps @StevenZhou01 can help with this)
TEXT:
"Did you know that Advertising adds 28% to each person’s Carbon Footprint in the UK"
"A child working in a mine in the Congo would need more than 700,000 years of non-stop work to earn the same amount as a single day of Bezos’ income." [perhaps on an amazon page]
"Advertising is adding an extra 28% to the annual carbon footprint of every single person in the UK" [perhaps a Google ads, or doubleclick or facebook page ]
"In 2019 the UK advertising industry was responsible for more than 186 million tonnes of CO2"
"In 2019 the UK advertising industry alone emitted CO2 equivalent to 47 coal-fired power plants running for 1 year."
currently in /AdLiPo/AdLiPo/src/js/injectTemplate.js
so we don't risk code mistakes when only working on text
Want to avoid situations like below where the entire page is ads (or an ad dominates the page–should be more subtle):
https://www.businessinsider.com/how-to-make-a-playlist-on-alexa
@dhowe I think now we are ready for the before release test. I have tested in a few websites on firefox and chrome (mainly on a win64 machine). Could you create a list here for what tests should be done? and maybe @MelodyneedsMoney can also help with this.
Given a width, height, and padding for a div, and a text-string, should first compute the largest font-size that will fit the text (computeFontSize function), then assign the proper CSS (doLayout function).
Assumptions
When there is a change made (bug fix, new feature add ...), it is important to check it on different platforms (because we haven't used poly-fill -- as UBO did not do that) we should at least make sure it works on the below platforms:
Mac
Window
file: https://github.com/dhowe/AdLiPo/blob/climate/climate/quotations.json ('climate' branch)
For the last checkbox, ideally the quotations are more factual, along the lines of the following:
{
"quote": "A child working in a mine in the Congo would need more than 700,000 years of non-stop work to earn the same amount as a single day of Bezos’ income.",
"author": "Kate Crawford and Vladan Joler",
"author-meta": "",
"source": "Anatomy of an AI System",
"date": "2018"
}
implant the text generation function
In the case where two ads are vertically adjacent, and would both be replaced, instead only one should be replaced, and the other just hidden
Implement a maximum number of visible ads onscreen at any given time (2-3)
potentially difficult to manage as user resizes window and scrolls
Collect large climate images for the specified resolution ratios: 4:3, 3:4, 32:9, 9:32, 2:1, 1:2
Target min sizes:
4:3 -> 960x720
2:1 -> 1000x500
32:9 -> 1920x540
Name them with the credit for the photographer and the dimensions: e.g., 'ChristopherFurlong_GettyImages_960x720.png'
Then place them in the correct folder for the ratio:
Modify the basic hiding mechanism so that instead of hiding DOM elements that match cosmetic filters, we simply show them as a colored rectangle.
You can see the current applied CSS here: https://github.com/gorhill/uBlock/blob/0718d816e1f509f0b36cdb1cf3f490a0045efe99/src/js/contentscript.js#L493
Eventual goal is something like below, but first step is just colored rectangles where ads would be:
this will create better user experience and also fix layout problems
Via email:
Can you please update uBlock origin to the latest version 1.39.2... As there were security issues in uBlock origin: https://portswigger.net/research/ublock-i-exfiltrate-exploiting-ad-blockers-with-css.
Thank you very much :)
https://edition.cnn.com/2021/08/20/tennis/naomi-osaka-defeat-cincinnati-spt-intl/index.html
This must never happen:
change version number in top level file, it should propagate down to the manifest.json files for the various platforms
located in dist/version
To replace our colored rectangles with random images from our image-set, we need a way to match the aspect ratio, then scale the image to the appropriate size for the ad rectangle on the page.
If we can identify a standard set of ad image ratios, then we can pre-select images for the image-set to match them...
Why do we have /AdLiPo/AdLiPo ?
And never resolves (until page refresh). Then repeats.
Take a look at [injectTemplate.js ][https://github.com/dhowe/AdLiPo/blob/main/src/js/injectTemplate.js]. Looks like climate code in the main branch. Can we repair so that these are separate?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.