4ace
February 18, 2025, 7:01am
1
Wana-Kijiji,
The business daily website developers are quite lazy, wanted to read some premium content and noted that the locking is being done on the browser.
So i decided to write a small javascript code to bypass this.
Enjoy the free premium content elders.
Just install tampermonkey extension on your browser and paste this code.
// ==UserScript==
// @name Read Premium in BDA
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Modify CSS properties for specific elements on businessdailyafrica.com
// @author You
// @match https://www.businessdailyafrica.com/*
// @grant GM_addStyle
// ==/UserScript==
(function() {
'use strict';
// Wait for the page to fully load
window.addEventListener('load', function() {
// Change the display property for elements with the class .nmgp
var nmgpElements = document.querySelectorAll('.nmgp');
nmgpElements.forEach(function(element) {
element.style.display = 'block'; // Change display property to block
element.style.position = 'relative';
element.style.zIndex = '1';
element.style.left = '1px';
element.style.color = 'black';
});
var paywall = document.querySelectorAll('.paywall');
paywall.forEach(function(element) {
element.style.display = 'none';
});
});
})();
You dont need to create an account to access the content.
9 Likes
Netflix costs ksh 700 p.m yet Business Daily wanataka tulipe ksh 1950 p.m kusoma gazetti? How? Wahack kabisa.
8 Likes
sani
February 18, 2025, 9:31am
3
@4ace wewe ndiye uko lazy. nation media watatoa wapi premium content? story yyote iko kwa magazeti huwa stale news, na hakuna kitu yyote inaweza kuwa premium kwa media houses za kenya.
ukitaka premium content, ingia kwa kijiji, tiktok, twitter, utapata information yote hapo ikiwa raw, ikiwa fresh, kabla ifikie wenzako.
1 Like
Nice. What other scripts you got? I’ve got one for removing that annoying signin modal on Discourse sites while browsing anon.
"use strict";
const gatedClassName = 'topic-in-gated-category';
function isGatedTopic(){
return document.body.classList.contains(gatedClassName);
}
function bypassGated(){
// clear style
document.body.classList.remove(gatedClassName);
// hide banner
document.querySelector(`.topic-above-post-stream-outlet.${gatedClassName}`).style.display = 'none';
}
function bypass(){
isGatedTopic() && bypassGated();
}
const observer = new MutationObserver((record, observer)=>{
bypass();
});
// apply on Discourse powered website
if(typeof Discourse !== 'undefined'){
// for init page
bypass();
// for page change
observer.observe(document.body, {attributeFilter: ['class']});
}
2 Likes
4ace
February 18, 2025, 10:14am
5
I quit social media almost a decade ago , tiktok ? Never downloaded the app, twitter has a lot of garbage for me to filter through , kijiji ni wangapi ,
1 Like
4ace:
// ==UserScript==
// @name Read Premium in BDA
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Modify CSS properties for specific elements on businessdailyafrica.com
// @author You
// @match https://www.businessdailyafrica.com/*
// @grant GM_addStyle
// ==/UserScript==
(function() {
'use strict';
// Wait for the page to fully load
window.addEventListener('load', function() {
// Change the display property for elements with the class .nmgp
var nmgpElements = document.querySelectorAll('.nmgp');
nmgpElements.forEach(function(element) {
element.style.display = 'block'; // Change display property to block
element.style.position = 'relative';
element.style.zIndex = '1';
element.style.left = '1px';
element.style.color = 'black';
});
var paywall = document.querySelectorAll('.paywall');
paywall.forEach(function(element) {
element.style.display = 'none';
});
});
})();
where do you run the code?
as in where do I paste the code once I install the extension?
caneran
February 18, 2025, 10:30am
9
Create new script. Although @4ace your script doesn’t work on all articles.
1 Like
4ace
February 18, 2025, 10:37am
10
Share a sample , I’ll check if it’s optimised for mobile
1 Like
that is my question, is there anything I need to do after installation and opening up the newspaper?
caneran
February 18, 2025, 10:50am
12
No, there’s nothing else to do except save it and reload the BDA page.
Try another browser. For some reason tampermonkey isn’t executing any scripts on brave. The script runs perfectly well on firefox PC. cc @4ace
1 Like
caneran:
…
Yes I have tried on Chrome, it seems ok
2 Likes
4ace
February 18, 2025, 11:03am
15
caneran:
…
I tested this on Firefox and Chrome , I don’t use brave , will check compatibility for brave.
1 Like
4ace
February 18, 2025, 4:59pm
16
This is awesome , lemmi try it out ,
Working on nation.africa and standard media , but seems they have limited theirs to backend validation.
I’ll share more
2 Likes
Leta code ya premium xvideos
1 Like
Use YT-DLP to download videos unyonge hadi ukufe.
NMG continue to loss the opportunity of getting more cash through advertising, if they only distributed their Newspapers(both physical and online editions) FOC.
If they did that the readership would grow exponentially which would attract more potential advertisers.
Every time I click their link and am required to subscribe, I just ignore.
1 Like
ama just download the smallest browser inaitwa Via browser kwa playstore. enda settings>userscript>then hapo wamesema paste your code here uweke hio amepost
Hio browser huwa iko na tools mob hata sijui niaje haijaipati recognition inaweza hata run kwa the slowest phones. Only 3mb