B
B
barkalov2011-04-02 10:17:50
Greasemonkey
barkalov, 2011-04-02 10:17:50

Userscript for greasemonkey hiding ex-girlfriend in Vkontakte friends list out of sight

Comrades, help! Broke up with a girl. And since the list of Vkontakte friends has recently been sorted according to the amount of communication, her name and photo now hang in the list in first place, each time reminding her of herself. And it will continue to “fall” down for a long time.

I'm a designer, I don't understand anything in javascript, I wrote this userscript,

var element = document.getElementById('user_block12345678')
element.style.display = 'none';


But it only works the first time you open the list. The next time (when the URL becomes sharp), the script does not work, because the content is loaded somehow dynamically and cunningly and something does not work.

And then nerves-nerves every time ...

Answer the question

In order to leave comments, you need to log in

9 answer(s)
K
Konstantin Kitmanov, 2011-04-02
@barkalov

write better UserCSS like this:

#user_block12345678 { display: none; }

F
Fr3nzy, 2011-04-02
@Fr3nzy

I understand you. There was a similar situation. The solution is easier: remove her from friends. Why are you there? You still won't communicate. Although, of course, there is a 1% chance that you will remain friends, but this is unlikely: this usually only happens in books and films, but not in real life.

V
vicnaum, 2011-04-02
@vicnaum

By the way, why not just remove her from friends? :)

V
Vas3K, 2011-04-02
@Vas3K

> because the content is loaded somehow dynamically and cunningly and something does not work.
It's just that the DOM node is re-created and your styles have been applied to the old one. Here you need to call this userscript of yours again to kill the girl every time.
Of course, it would be best to find an event of some kind and become attached to it, but you can use a timer cheaply and cheerfully.
jQuery recently made, I believe, a .live() attribute that makes rebindings like this for newly created elements.

C
chupkb, 2011-04-02
@chupkb

> Userscript hiding ex-girlfriend in Vkontakte friends list out of sight
I have bad news for you.

R
rPman, 2011-04-02
@rPman

The stylish plugin is available for firefox and chrome, it allows you to conveniently and quickly manage various modifications of the interfaces of different websites - hide site blocks, change fonts, colors or sizes. There is a database of published user modifications with screenshots and comments.

R
Riateche, 2011-04-03
@Riateche

It's easier to write a CSS rule here. Something like
div[id=user_block12345678] { display:none }
Ajax will no longer interfere here. To apply the rule in FF, we have Stylish.

A
Anatoly, 2011-04-02
@taliban

Delete it and if you want to be 1%, after half a year write to her a banal hello world “hello, how are you?”, you will get one of three:
1. there will be no answer (and is it necessary then?)
2. You will remember the past and off we go (exactly that 1%)
3. You will not remember the past and she will no longer cause "nostalgia" in the friends list (no user script)
I did this, now my ex is in my friends list, the third option worked.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question