Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name O.E. 13/10/11 (Script sem nome)
- // @version 0.1 Beta
- // @description Notificador de novos tópicos da comunidade Orkut Exploits.
- // @icon none
- // @namespace http://x470.com
- // @author Pedro Prata L. Papadópolis
- // @include https://*.orkut.com.br/Main*
- // @match https://*.orkut.com/Main*
- // @match https://*.orkut.co.in/Main*
- // @match http://*.orkut.com/Main*
- // @match http://*.orkut.co.in/Main*
- // @match http://*.orkut.com.br/Main*
- // ==/UserScript==
- // // @require http://x470.com/oe131011_update.js
- _ini = false;
- if(!_ini) {
- ___$ = [];
- ___$.push(document.createElement("style"));
- with(___$[(___$.length)-1]) {
- media = "screen";
- rel = "stylesheet";
- type = "text/css";
- innerHTML = ' \
- #_papa { \
- bottom: 0; \
- margin-bottom: -3px; \
- position: fixed; \
- right: 50px; \
- background-color: white; \
- } \
- ._titulo { \
- background-color: #888888; \
- border-radius: 1px 1px 0 0; \
- color: white; \
- font-size: 12.5px; \
- padding: 3px 15px; \
- text-align: center; \
- } \
- #_corpo { \
- background-color: white; \
- border-radius: 0 0 2px 2px; \
- padding: 4px; \
- } \
- #_link { \
- color: #666666; \
- text-decoration: none; \
- font-size: 11px; \
- } \
- \ '
- }
- ___$.push(document.createElement("div"));
- with(___$[(___$.length)-1]) {
- id = "_papa";
- innerHTML = ' \
- <a id="_titulo" onclick="_papa()" href="javascript:;"> \
- <div class="_titulo" id="__titulo"><span id="_cmmTitulo">Carregando...</span> <span id="_novos"></span> </div> \
- </a> \
- <div id="_corpo" style="display: none;">Carregando...</div> \
- \ ';
- }
- ___$.push(document.createElement("script"));
- with(___$[(___$.length)-1]) {
- type = "text/javascript";
- innerHTML = '\
- function I(x) {return document.getElementById(x)} \
- \
- var cmm = 82433397; \
- var RE1 = /tid\\=\\d+\\n">.*\\n.*\\n<.*\\n.*\\n.*\\n.*\\n.*\\n.*\\n.*\\n.*\\n.*\\n.*\\n.*/g; \
- var RE2 = /tid\\=(\\d+)\\n">.*\\n(.*)\\n<.*\\n.*\\n.*\\n.*\\n.*\\n.*\\n.*?>(\\d+)<.*\\n.*\\n(.*)/; \
- var RE3 = /cmm\\=\\d+"><b>(.*?)<\\/b>/; \
- var _x = false; \
- var l = null; \
- var k = null; \
- var cor1 = "#ffffcc"; \
- var cor2 = "#ffffff"; \
- var T = []; \
- var G = true; \
- \
- if(document.cookie.search(/_papa=/i) !== -1) { \
- C = document.cookie.match(/_papa=(.*?;|.*)/i)[1]; \
- if(C.type !== "undefined") { \
- if(C.search(/;/) !== -1) \
- C = C.replace(/;/g,""); \
- C = C.replace(/\_/g," "); \
- l = C; \
- } \
- } \
- \
- function _$$(u,t,s) { \
- $ = new XMLHttpRequest; \
- with($) { \
- open(t,u,false); \
- if(t=="POST") \
- setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); \
- send(s); \
- r = responseText; \
- } \
- return r; \
- } \
- \
- function _ref() { \
- o = ""; \
- d = _$$("/CommTopics?cmm="+cmm,"get",null); \
- t = d.match(RE1); \
- c = 0; \
- P = []; \
- for(x in t) { \
- v = t[x].match(RE2); \
- if(x == 0 && l == null) { \
- k = v[4]; \
- document.cookie = "_papa="+v[4].replace(/ /g, "_"); \
- } else \
- G = false; \
- U = /<a href="CommMsgs?cmm=/.source+cmm+/&tid=/.source+v[1]+/&na=2" target="orkutFrame" id="_link"><div onmouseover="this.style.backgroundColor=cor1" onmouseout="this.style.backgroundColor=cor2">• <b>/.source+v[2]+/</.source+"/"+/b> <small>/.source+v[4]+/</.source+"/"+/small></.source+"/"+/div></.source+"/"+/a>/.source; \
- if(T.length == 0) { \
- if(v[3] == l) \
- break; \
- else \
- ++c; \
- o += U; \
- } else { \
- _incluir = true; \
- for(z in T) \
- if(v[1]==T[z][0] && v[2]==T[z][1] && v[3]==T[z][2] && v[4]==T[z][3]) { \
- _incluir = false; \
- break; \
- } \
- if(_incluir) { \
- ++c; \
- o += U; \
- } \
- } \
- if(!G) \
- P.push([v[1],v[2],v[3],v[4]]); \
- } \
- \
- if(!_x) { \
- l = k; \
- tlt = d.match(RE3); \
- I("_cmmTitulo").innerHTML = tlt[1]; \
- I("_corpo").innerHTML = "Sem posts novos"; \
- I("_novos").innerHTML = "(0)"; \
- _x = true; \
- } else { \
- if(c > 0) { \
- I("_corpo").innerHTML = o; \
- with(I("__titulo").style) { \
- backgroundColor = "#3399FF"; \
- } \
- } else { \
- with(I("__titulo").style) { \
- backgroundColor = "#888888"; \
- } \
- \
- I("_corpo").innerHTML = "Sem posts novos"; \
- } \
- \
- if(c > 7) \
- with(I("_corpo").style) { \
- height = "160px"; \
- overflow = "auto"; \
- } \
- else \
- with(I("_corpo").style) { \
- height = "auto"; \
- overflow = "visible"; \
- } \
- I("_novos").innerHTML = "("+c+")"; \
- } \
- \
- setTimeout("_ref()", 15000); \
- } \
- \
- function _papa() { \
- if(I("_corpo").style.display == "none") { \
- I("_corpo").style.display = "block"; \
- I("__titulo").style.backgroundColor = "#3399FF"; \
- I("_papa").style.width = "400px"; \
- } else { \
- l = k; \
- document.cookie = "_papa="+k.replace(/ /g, "_"); \
- T = P; \
- I("_novos").innerHTML = "(0)"; \
- I("_corpo").style.display = "none"; \
- I("__titulo").style.backgroundColor = "#888888"; \
- I("_papa").style.width = "inherit"; \
- } \
- } \
- \
- _ref(); \
- \ ';
- }
- for(x in ___$)
- document.body.appendChild(___$[x]);
- _ini = true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement