Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.location.pathname.match(/\/u\d+/) && $(function() {
- if (!_userdata.session_logged_in) return;
- var lang = {
- poke : 'Cutucar',
- message : 'Você foi cutucado !'
- },
- a = document.createElement('DIV'), b = poke(window.location.pathname.match(/u(\d+)/)[1], document.title.match(/.*? - (.*)/)[1]), c = document.getElementById('profile-advanced-right') || document.getElementById('page-body');
- a.style.textAlign = 'right';
- a.appendChild(b);
- c.insertBefore(a,c.firstChild);
- if (window.location.pathname.match(/wall/) && $('.message-footer').length) {
- for (var i = 0, c = $('.message-footer'); i<c.length; i++) {
- var d = document.createElement('LI'), e = poke($('.message-header:eq('+i+') a').attr('href').match(/u(\d+)/)[1], $('.message-header:eq('+i+') a').text());
- d.appendChild(e);
- c[i].insertBefore(d,c[i].firstChild);
- }
- }
- function poke(id, unm) {
- var a = document.createElement('A');
- if (id == _userdata.user_id) return a;
- a.href = '/privmsg?mode=post_profile&u=' + id;
- a.innerHTML = lang.poke;
- a.className = 'pokie';
- a.onclick = function(e) {
- var id = this.href.match(/u=(\d+)/)[1];
- e.preventDefault();
- $.post('/privmsg?mode=post_profile',{
- subject : lang.poke,
- message : lang.message,
- username : unm,
- post : 1
- },function() { window.location.pathname = '/u' + id + 'wall' });
- };
- return a;
- };
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement