 enu800 user thejosh scripts newpagepatrolu82ejsu800 varu800 npp_http; varu800 npp_enabled; varu800 npp_num_pages 50u800; varu800 npp_refresh; varu800 npp_num_idle_req; varu800 npp_curr_idle_req; varu800 npp_str_no_ajax "u8d8b8u8d8a7u8d987u8d8b1u8d8a7u8d98b u8d8afu8d8b1 u8d8a7u8d8b3u8d8aau8d981u8d8a7u8d8afu8d987 u8d8a7u8d8b2 u8d8a7u8d8b3u8daa9u8d8b1u8db8cu8d9beu8d8aa u8daafu8d8b4u8d8aa u8d8b5u8d981u8d8adu8d987u8d994 u8d986u8d988 u8d985u8d8b4u8daa9u8d984u8db8c u8d988u8d8acu8d988u8d8af u8d8afu8d8a7u8d8b1u8d8af. u8d985u8d8b1u8d988u8d8b1u8daafu8d8b1 u8d8b4u8d985u8d8a7 u8d8a7u8d8b2 u8d8a7u8db8cu8d986 u8d8a7u8d8a8u8d8b2u8d8a7u8d8b1 u8d9beu8d8b4u8d8aau8db8cu8d8a8u8d8a7u8d986u8db8c u8d986u8d985u8db8cu8e2808cu8daa9u8d986u8d8af "; varu800 npp_str_box_title "u8d8b5u8d981u8d8adu8d987u8e2808cu8d987u8d8a7u8db8c u8d986u8d988"; varu800 npp_str_box_title_updating 'u8d8b5u8d981u8d8adu8d987u8e2808cu8d987u8d8a7u8db8c u8d986u8d988 '; varu800 npp_str_box_title_failed "u8d8b5u8d981u8d8adu8d987u8e2808cu8d987u8d8a7u8db8c u8d986u8d988 u8d8a8u8d987u8e2808cu8d8b1u8d988u8d8b2u8d8b1u8d8b3u8d8a7u8d986u8db8c u8d8b4u8daa9u8d8b3u8d8aa u8d8aeu8d988u8d8b1u8d8af "; varu800 npp_str_enable "u8d981u8d8b9u8d8a7u8d984u8e2808cu8daa9u8d8b1u8d8afu8d986 u8d8a7u8db8cu8d986 u8d8acu8d8b9u8d8a8u8d987"; varu800 npp_str_disable "u8d8bau8db8cu8d8b1u8d981u8d8b9u8d8a7u8d984u8e2808cu8daa9u8d8b1u8d8afu8d986 u8d8a7u8db8cu8d986 u8d8acu8d8b9u8d8a8u8d987"; npp_init ; * initalise * function npp_init allow user settings through ifu800 npp_enabled null npp_enabled false; ifu800 npp_num_pages null npp_num_pages 10u800; ifu800 npp_refresh null npp_refresh 5u800; ifu800 npp_num_idle_req null npp_num_idle_req 60u800; au800 fewu800 limits tou800 beu800 nice tou800 theu800 servers ifu800 npp_num_pages 50u800 npp_num_pages 50u800; ifu800 npp_num_pages 1u800 npp_num_pages 1u800; ifu800 npp_refresh 2u800 npp_refresh 2u800; ifu800 npp_num_idle_req 1000 npp_num_idle_req 1000; ifu800 npp_num_idle_req 5u800 npp_num_idle_req 5u800; getu800 ouru800 cookie ifu800 documentu82ecookieu82elength 0u800 varu800 c_start documentu82ecookieu82eindexof "npp_show_box " ; ifu800 c_start 1u800 c_start c_start 13u800; varu800 c_end documentu82ecookieu82eindexof ";" c_start ; ifu800 c_end 1u800 c_end documentu82ecookieu82elength; ifu800 documentu82ecookieu82esubstring c_start c_end "yesu800" npp_enabled true; else npp_enabled false; either make au800 request oru800 show nothing npp_curr_idle_req 0u800; ifu800 npp_enabled true npp_ajax_request ; else npp_draw_disabled_box ; * init ajax * function npp_create_request tryu800 npp_http newu800 xmlhttprequest ; catch eu800 tryu800 npp_http newu800 activexobject "msxml2u82exmlhttp" ; catch eu800 tryu800 npp_http newu800 activexobject "microsoftu82exmlhttp" ; catch eu800 return false; npp_httpu82eonreadystatechange function ifu800 npp_httpu82ereadystate 4u800 npp_ajax_response ; return true; * make au800 request * function npp_ajax_request ifu800 weu800 have done toou800 many requests disable theu800 boxu800 npp_curr_idle_req ; ifu800 npp_curr_idle_req npp_num_idle_req npp_disable_box ; check weu800 areu800 enabled ifu800 npp_enabled false return; firstly inform theu800 user varu800 cur_box documentu82egetelementbyid 'pu800 newpages ; ifu800 cur_box null cur_boxu82efirstchildu82einnerhtml npp_str_box_title_updating; ifu800 npp_create_request false ifu800 cur_box null cur_boxu82efirstchildu82efirstchildu82edata npp_str_box_title_failed; else alert npp_str_no_ajax ; getu800 theu800 current time varu800 dateobj newu800 date ; varu800 nowu800 mathu82efloor dateobju82egettime 1000u82e0u800 ; gou800 back 5u800 mins inu800 time nowu800 60u800 * 5u800 ; then make theu800 request npp_httpu82eopen "getu800" " wu800 apiu800u82ephpu800 action query&format xmlu800&list recentchanges&rcshow botu800 redirect&rctype newu800&rcnamespace 0u800&rcprop title timestamp idsu800 patrolled&rcstart " nowu800 "&rclimit " npp_num_pages true ; npp_httpu82esend null ; function npp_draw_disabled_box ifu800 mwu800u82econfigu82egetu800 'skin' 'vector' npp_draw_disabled_box_vector ; else npp_draw_disabled_box_monobook ; function npp_ajax_response ifu800 mwu800u82econfigu82egetu800 'skin' 'vector' npp_ajax_response_vector ; else npp_ajax_response_monobook ; andu800 dou800 itu800 again inu800 5u800 secs settimeout "npp_ajax_request " npp_refresh * 1000 ; function npp_disable_box npp_enabled false; npp_draw_disabled_box ; documentu82ecookie "npp_show_box nou800; path "; function npp_enable_box npp_enabled true; npp_curr_idle_req 0u800; documentu82ecookie "npp_show_box yesu800; path "; npp_ajax_request ; * draw disabled monobook * function npp_draw_disabled_box_monobook container divu800 varu800 link_div documentu82ecreateelement 'divu800' ; link_divu82eclassname 'pbody'; varu800 divu800 documentu82ecreateelement 'divu800' ; divu800u82esetattribute 'idu800' 'pu800 newpages ; divu800u82eclassname 'portlet'; varu800 heading documentu82ecreateelement 'h3u800' ; headingu82eappendchild documentu82ecreatetextnode npp_str_box_title ; divu800u82eappendchild heading ; divu800u82eappendchild link_div ; enable link varu800 pu800 documentu82ecreateelement 'pu800' ; pu800u82estyleu82efontsize 'xu800 small'; pu800u82estyleu82emargin '0pxu800'; varu800 au800 documentu82ecreateelement 'au800' ; au800u82eappendchild documentu82ecreatetextnode npp_str_enable ; au800u82eonclick npp_enable_box; pu800u82eappendchild au800 ; link_divu82eappendchild pu800 ; nowu800 replace theu800 divu800 varu800 old_div documentu82egetelementbyid 'pu800 newpages ; varu800 side_col documentu82egetelementbyid 'column oneu800' ; ifu800 old_div null side_colu82ereplacechild divu800 old_div ; else ifu800 side_col null varu800 node documentu82egetelementbyid 'pu800 search' ; ifu800 node && side_col && nodeu82eparentnode side_col side_colu82einsertbefore divu800 node ; * draw response monobook * function npp_ajax_response_monobook ifu800 npp_http npp_httpu82eresponsexml return; varu800 items npp_httpu82eresponsexmlu82egetelementsbytagname 'rcu800' ; create theu800 divu800 that holds allu800 theu800 newpage links varu800 link_div documentu82ecreateelement 'divu800' ; link_divu82eclassname 'pbody'; varu800 list documentu82ecreateelement 'ulu800' ; link_divu82eappendchild list ; populate theu800 list with 10u800 links. foru800 varu800 iu800 0u800; iu800 h3u800' .keydown function event ifu800 eventu82ewhich 13u800 * enter * eventu82ewhich 32u800 * space * npp_toggle this ; .mousedown function npp_toggle this ; this .blur ; return false; ; else link_divu82eappendchild pu800 ; * draw response vector skin * function npp_ajax_response_vector ifu800 npp_http npp_httpu82eresponsexml return; varu800 items npp_httpu82eresponsexmlu82egetelementsbytagname 'rcu800' ; create theu800 divu800 that holds allu800 theu800 newpage links varu800 link_div documentu82ecreateelement 'divu800' ; link_divu82eclassname 'body'; link_divu82estyleu82edisplay "block"; varu800 list documentu82ecreateelement 'ulu800' ; link_divu82eappendchild list ; populate theu800 list with 10u800 links. foru800 varu800 iu800 0u800; iu800 h3u800' .keydown function event ifu800 eventu82ewhich 13u800 * enter * eventu82ewhich 32u800 * space * npp_toggle this ; .mousedown function npp_toggle this ; this .blur ; return false; ; else link_divu82eappendchild pu800 ; function npp_toggle element .cookie 'vector navu800 ' elementu82eparent .attr 'idu800' elementu82eparent .isu800 '.collapsed' ; ifu800 elementu82eparent .isu800 '.collapsed' npp_enable_box ; else npp_disable_box ; element .parent .toggleclass 'expanded' .toggleclass 'collapsed' .find 'divu800u82ebody' .slidetoggle 'fast' ; 