Archived Comments (locked)
|
|
The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008) |
|
|
actually, i looked at your code, and there are some things that aren't possible in CSS.... my fault. but i think you can condense your code a bit. I haven't tested it out, but I believe this should work the same, except a bit faster: kill=function(x) {if(x) x.parentNode.removeChild(x)};
kill(document.getElementById('sidebar_ads'));
function killIterator(regex, element, source) {
var checker = document.evaluate("//"+element,document,null,4,null);
while(obj=checker.iterateNext())
if (regex.test(source ? obj.src : obj.className)) kill(obj);
}
setInterval(function() {
killIterator(/[^\w]ad[^d]|[^\w]Ad[^d]|[^\w]a.htm|monetize|banner/,"iframe", true);
killIterator(/social_ad|sidebar_item\ssponsor/,"div", false);
},500);
In case you're wondering what the hell Also, why did you set a half a second interval? Are there ads that refresh themselves? Which page does it happen on, because if I can identify it, I can supply a line that will stop the ads from refreshing. |
|
|
true...this scripts only tests for class, src and id attribute and removes or hides such nodes. I don't know the CCS selectors...can I ask you if it's possible to apply regular expressions? because in that case your approach would be much better. It would be really easy to shift this "idea" to that side. I know there's already, but I'd prefer to apply my personal strategy for my own purpose...at least I would try to suggest to remove applications ads too. In that case it would work just like mine. don't you think? or did I miss something? ps. thank you for your help ;) |
|
|
You're absolutely right that GreaseMonkey is infinitely times more powerful than Stylish. I was recommending Stylish instead because this really just tests attribute values on ps. sorry if i sound like a giant ass, i'm just trying to help |
|
|
it seems a polemic approach, maybe I'm wrong, sorry in that case.
Now about the stylish script... First let's talk about what I said last time...I prefer the greasemonkey way. Yes I prefer that way because it's more powerful, I can inject javascript code on the original page and take absolute power, match patterns and modify the appearance. This has a bad side as everything, the bumpy effect you were talking about. But what can I do? I prefer paying the price of the bumpy effect instead of keeping the ads where they are. If you have a solution tell me, your stylish script still doesn't remove that ads and yet I didn't hear from you a javascript approach to avoid the bump. What I found in your gm "wrapper" is only a different way of running the main function. It seems better than mine because doesn't run periodically every x seconds. I tried to modify my script using that solution but it didn't work everytime. I'll inspect this later, it could be useful. when you suggested that script the first time, I tried, but it didn't work as well as now. Now I have to say that's much better, it does quite a good job in a restricted domain. But the problem is that. It still doesn't work as well as I'd like it to. why? It doesn't remove more ads as you say! I don't know what are you talking about, but please if I'm wrong try to explain me better, I'm here to find the best solution to my problem, not only write my name on a loser product. If my script is worst by all means compared to something different I admit it. But I need clear evidence of that, and still I haven't. That stylish stuff doesn't remove the ads on applications. That's the most tricky part, because it's really difficult to find a general pattern to recognize them without doubts. That is why I always need the users help, you have to tell me when the script doesn't work in a specific circumstance so I can solve it. Facebook it's a living creature, it always changes, and we must be there to go along with it. I think the stylish approach alone can't work at all, because it doesn't recognize patterns. The ads container do not always have a unique name, you have to extract them using a strategy to distinguish them from the legitimate ones. So please answer this question, how can a stylish script match patterns? and how does it hide ads inside applications?? I need those answers to move on and change solution. so to summarize and answer your points:
|
|
|
also, about the comment i made before:
|
|
|
not that it really matters, but i wanted to share this: if(obj!=null) obj.style.visibility = 'hidden'; is exactly equal to: if (obj) obj.style.visibility = 'hidden'; |
|
|
Wow, that was quick! Thanks Diego! Got it reenabled and it's looking good again... will run with it throughout the day and report in anything else I find. :) |
|
|
thanks CheriePie for your comment. I really need these ones, because I can't look every application by myself and with your help only I can adjust the script to make it work according to your habits. Anyway I 've never seen Realm of Empires before so I've just tried it now. You were right, my strategy was way too optimistic before. So I redesigned it. Now I improved it but it could be a bit less adaptable than before, so please! help me and yourself, when you find even the littlest problem let me know writing a comment with some details and I'll try to fix the script as soon as possibile. Anyway now everything seems to work as it's supposed to do. |
|
|
Unfortunately, it disabled the entire Realm of Empires game from showing up at all. :( Otherwise it was really looking good there for awhile. |
|
|
Thanks diego.devita,
|
|
|
what i found was the sponsored feeds in that section. it seems like you describe. I uploaded a new version that removes that feeds. let me know if I got it wrong. thanks for the help. |
|
|
Is there any chance of removing the ads on the Home site?
The name of the div class is "feed_item clearfix has_body social_ad social_ad_no_full_clickable". |
|
|
that is not the intended scope of this script. I don't even know why you should remove that bar. anyway the div is called scoUITwoColumnLayout_NarrowContent. you should hide the visibility of that object. |
|
|
Hey, very nice script thank you.. but can someone tell me what do I need to add to this script if I wanted to also hide the sidebar? I mean the "sponsored" tab and "applications" and "people you may know".. etc? |
|
|
I'm happy to have a supporter :D thanks Davy. For avg: I didn't know the script you suggest. anyway it lives in a different world. I don't even know if it works well as you say, but it doesn't matter. I was looking for a greasemonkey(!) script and I couldn't find anything useful. So I did one that worked as it was supposed to do. That's it. I hope someone else will find that stylish script useful for himself, I personally prefer the greasemonkey way. |
|
|
no, this one is better. |
|
|
Best anti Facebook ads script out there, not doubt.
|