I have a basic chrome extension that I utilize on a specific URL to make slight adjustments to the page layout (such as color and position).
Now, I am attempting to apply the same modifications to a new URL. The code I am using for both URLs is identical, but it seems to work properly on one URL while failing on another.
Below is the code that is not functioning correctly. In this post, I have replaced the actual URL with SITE
.
var url = window.location.href;
if (url.toLowerCase().indexOf('SITE') >= 0) {
console.log ('Making CSS changes');
$('.main-container').css({"background":"red"});
}
The element I am trying to modify is:
<clr-main-container _ngcontent-c0="" class="main-container">
After checking my console, I can see 'Making CSS changes' being logged, but visually there are no apparent alterations.
This particular URL is accessed through HTTPS and has firewall protection. I am uncertain if the firewall may be blocking these modifications or something else is causing the issue.
If anyone has any insights or suggestions, please feel free to share. Thank you!