The My Opera forums have been replaced with forums.opera.com. Please head over there to discuss Opera's products and features
See the new ForumsYou need to be logged in to post in the forums. If you do not have an account, please sign up first.
Remove element by Id
I'm trying to make a script to remove some elements by Id.I searched the forum, the web, downloaded some scripts, but nothing.
Also can you check the change style at the bottom?
Here's the code:
(function(){
var QAPane = document.getElementById('IAPWrapper');
var ads = document.getElementById('SkyscraperContent');
if(ads) {
ads.parentNode.removeChild(ads);
}
if(QAPane!=null) {
QAPane.parentNode.removeChild(QAPane);
}
// expand panes
var mcStyle = document.getElementById('MainContent').style;
var mcwStyle = document.getElementById('ManagedContentWrapper').style;
mcStyle.style.right = '5px';
mcwStyle.style.right = '0px';
mcStyle.style.marginRight = '1px';
mcwStyle.style.marginRight = '1px';
}) ();
The stuff on top looks like it should probably work, but if this isn't a GreaseMonkey style script (.user.js extension) then you'll have to add an eventlistener to make it execute after those elements exist.
As for the style stuff, I'd lose the .style at the end of those first two, or otherwise lose it from the 4 bottom ones.
As for the style stuff, I'd lose the .style at the end of those first two, or otherwise lose it from the 4 bottom ones.
The DnD Sanctuary — a safety net for My Opera's demise.