GoogleMonkeyR Fix (Jul 2017)

Google - Multiple columns of results, Remove "Sponsored Links", Number results, Auto-load more results, Remove web search dialogues, Open external links in a new tab, self updating and all configurable from a simple user dialogue.

  1. // ==UserScript==
  2. // @author mungushume
  3. // @version 1.7.4
  4. // @name GoogleMonkeyR Fix (Jul 2017)
  5. // @namespace http://www.monkeyr.com
  6. // @description Google - Multiple columns of results, Remove "Sponsored Links", Number results, Auto-load more results, Remove web search dialogues, Open external links in a new tab, self updating and all configurable from a simple user dialogue.
  7. // @include http://www.google.*/webhp?*
  8. // @include http://www.google.*/search?*
  9. // @include http://www.google.*/ig?*
  10. // @include http://www.google.*/
  11. // @include http://www.google.*/#*
  12. // @include https://www.google.*/webhp?*
  13. // @include https://www.google.*/search?*
  14. // @include https://www.google.*/ig?*
  15. // @include https://www.google.*/
  16. // @include https://www.google.*/#*
  17. // @include https://encrypted.google.*/webhp?*
  18. // @include https://encrypted.google.*/search?*
  19. // @include https://encrypted.google.*/ig?*
  20. // @include https://encrypted.google.*/
  21. // @include https://encrypted.google.*/#*
  22. // @grant GM_registerMenuCommand
  23. // @grant GM_addStyle
  24. // @grant GM_setValue
  25. // @grant GM_getValue
  26. // @grant GM_xmlhttpRequest
  27. // @uso:script 9310
  28. // @scriptsource http://userscripts.org/scripts/show/9310
  29. // @scriptsource http://google.monkeyr.com/script/1.7.0/googlemonkeyr.user.js
  30. /* StartHistory
  31.  
  32. v.1.7.4 - 19 Jul 2017 - by linus linus
  33. - Bug fix: Settings link re-added
  34. - Bug fix: Inline numbered re-added
  35. - Bug fix: Rich cards results re-added
  36.  
  37. v.1.7.3.1 - 23 Jul 2015 - by Kilvoctu
  38. - Bug fix: Autoload results should now display more results.
  39.  
  40. v.1.7.3 - 23 Jul 2015 - by Kilvoctu
  41. - Bug fix: Showing search results after Google changes
  42. - Change: Column width scales with window width
  43. - Known issues: Autoload results doesn't display more results.
  44. v.1.7.2 - 31 Aug 2014 - by Boltex
  45. - Bug fix: Google Changes in wdith in some divs
  46. - Feature: Remove next page link and loading image.
  47. *note* - If the results of the your search will go beyond the screen,
  48. you must find and change resolution. Find 1240px and change to your value.
  49.  
  50. v.1.7.1 - 26 Mar 2014 - by Boltex
  51. - Bug fix: Calculator results (single result) pages now work properly
  52.  
  53. v1.7.0 - 01 Nov 2013
  54. - Bug fix: Google changes in some tlds fix for display issues
  55.  
  56. v1.6.9 - 15 Aug 2013 beta
  57. - Bug fix: Google changes in some tlds (all at some point in the near future)
  58. made the results not fill the screen width. One little css tweak to fix!
  59.  
  60. v1.6.8 - 14 May 2013 beta
  61. - Bug fix: Calculator results (single result) pages now work properly
  62. - Feature: Results numbered in news searches (if enabled).
  63. - Feature: Added a next page link to the loading image when auto load is
  64. enabled. This allows you to carry on with your search even if the auto load
  65. fails. Suggested by Isuzu.
  66. - Bug fix: When changing search method (browser toolbar to google search box)
  67. results from the original search could leak through.
  68.  
  69. v1.6.7 - 29 Apr 2013 beta
  70. - Feature: Right hand panel is now handled as a flyout tab.
  71. - Bug fix: Changes to the result processing trigger. Hopefully it will
  72. catch more iterations
  73. - Feature: Loads more logging options (internal use for now)
  74. - Bug fix: On failure to process results properly (no results displayed)
  75. a result request run state won't occur i.e. No flood of requests to
  76. google, resulting in a capcha being displayed.
  77.  
  78. v1.6.6 - 26 Apr 2013
  79. - Checkout the changes from v1.6.4 unless you've been upgrading manually!
  80. - Bug fix: "Sponsored Links" ad removal on rhs
  81. - Bug fix: white-space:nowrap causing divs to overlap
  82. - Feature: back to top link now uses CSS transitions
  83.  
  84. v1.6.5 - 26 Apr 2013
  85. - Bug fix: Showing of favicons for https results and results with port
  86. numbers
  87. - Bug fix: A fix for google chrome's DOM event limitations
  88. - Bug fix: A fix for chrome's horrible way of dealing with the lack of
  89. GM_getValue and GM_setValue functions. What were they thinking?!
  90.  
  91. v1.6.4 - 25 Apr 2013
  92. - Bug fix: Showing results after google changes approx 24 Apr 2013
  93. Fixed trackless links
  94. Fixed favicons and GooglePreview
  95. Fixed "Sponsored Links" ad removal
  96. - Feature: Addition of back to top link when autoload results is selected and
  97. scrolled down the page a way
  98.  
  99. v1.6.3 - 21 Mar 2013
  100. - Bug fix: Only remove the left results margin if more than one column of
  101. results is selected.
  102. - Bug fix: Searches Related to only moved to the top if autoload more results
  103. is selected.
  104.  
  105. v1.6.2 - 18 Jan 2013
  106. - Bug fix: Missing GoogleMonkeyR options on /webhp? pages
  107. - Bug fix: Result positioning on all pages
  108. - Bug fix: Currency conversions were being hidden. Thanks cip
  109. - Bug fix: Searches related to moved to top
  110. - Bug fix: "Don't display the Google web search dialogues" corrected position
  111. of preferences link
  112. - Bug fix: loading animation not displaying on google instant further
  113. searches. Thanks smk
  114. - Bug fix: Sublink tracking bug. Cheers smk!
  115. - Bug fix: Rollover of images in general results now shows an enlarged version
  116. of the image. Thanks r600
  117. - Feature: Removal of remove "Search Tools" as its now obsolete
  118. - Feature: Addition of remove "Right Panel" setting
  119.  
  120. v1.6.1 - 14 Jan 2013
  121. - Bug fix: Missing Fav icons on first results
  122. - Bug fix: Missing preview images on first results
  123. - Bug fix: Missing open in new tab/window on first results
  124.  
  125. v1.6.0 - 17 Dec 2012
  126. - Bug fix: Page width with autoload more results enabled
  127. - Bug fix: Inline numbered results
  128. - Bug fix: No results on image searches
  129. - Bug fix: Settings link enabled eveywhere (hopefully)
  130. - Bug fix: GM_functions being overwritten. thanks derjanb
  131.  
  132. v1.5.4.5 beta - 13 Dec 2011 - USE THIS ONLY IF YOU HAVE THE NEW GOOGLE TOOLBAR!
  133. - Feature: Now works with google instant. Modded the google instant code to
  134. work with Chrome.
  135.  
  136. v1.5.4.4 beta - 13 Dec 2011 - USE THIS ONLY IF YOU HAVE THE NEW GOOGLE TOOLBAR!
  137. - Feature: Now works with google instant. Almost fried my head doing it and the
  138. code isn't pretty but it seems quite stable. Your feedback is welcomed!
  139.  
  140. v1.5.4.3 beta - 10 Dec 2011 - USE THIS ONLY IF YOU HAVE THE NEW GOOGLE TOOLBAR!
  141. - Security: Using favicons or imagepreview on a secure (https) google search
  142. page would expose those urls to the unencrypted version of google therefore
  143. breaking the security of the page. This occured due to an oversite on my part
  144. and i sincerely apologise. Special thanks to semur5 for idenitfying the issue!
  145.  
  146. v1.5.4.2 beta - 9 Dec 2011 - USE THIS ONLY IF YOU HAVE THE NEW GOOGLE TOOLBAR!
  147. - Feature: Sublink tracking now respects your choice in the preferences.
  148. Trackless links are also added when Disable Google Tracking is disabled. Thanks
  149. @smk for your input!
  150.  
  151. v1.5.4.1 beta - 8 Dec 2011
  152. - Feature: When "Don't display the Google web search dialogues" is checked with
  153. the new Google toolbar, elements are moved around to maximise your screen real
  154. estate. USE THIS ONLY IF YOU HAVE THE NEW GOOGLE TOOLBAR!
  155.  
  156. v1.5.4 - 6 Dec 2011
  157. - Bug fix: GoogleMonkeyR preferences link moved after googles update to the
  158. menu bar. Thanks for the info on how to get it digideth!
  159.  
  160. Since this Google update i'm unsure what to do about removal of search boxes
  161. etc. I could start moving elements around on the page but through experience
  162. i'm sure this will end up breaking the script more often. Not good!
  163. beta versions (with elements moved around for new toolbar ONLY) can be found
  164. here http://google.monkeyr.com/ff/history.php
  165.  
  166. v1.5.3 - 21 Nov 2011
  167. - Bug fix: Addition of https includes. Thank you @J-Mac!
  168. - Bug fix: Multiple columns of results were sometimes spilling out of the width
  169. of the browser (giving horizontal scrollbars). Now Fixed!
  170.  
  171. v1.5.2 - 5 Oct 2011
  172. - Bug fix: Repaired top margin on image results. Thanks to trup for the screen
  173. shot, version info and link to a problem page! Easy to track down bugs when
  174. this sort of info is provided ;)
  175.  
  176. v1.5.1 - 5 Oct 2011
  177. - Bug fix: Repaired Cached and Similar links when Disable Google tracking my
  178. search results is checked.
  179. - Bug fix: Altered the position of the Advanced Search link when Don't display
  180. the Google web search dialogues is checked (works better on smaller screens).
  181. - Bug fix: Corrected the positioning of elements at the top of the page on
  182. image searches.
  183. - Bug fix: Shopping searches now show the your location / sort by top tool bar.
  184. - Bug fix: Video search now shows thumbnails for auto loaded content.
  185.  
  186. v1.5 - 25 Sep 2011
  187. - Bug fix: result container width has been limited in a recent update. Now
  188. fixed. Thanx @ck0743 and @Phil699 for your patience
  189. - Bug fix: Various other fixes after the most recent google updates. 4 hours
  190. coding in all just to get it back to how it was! Deep joy ;)
  191.  
  192. v1.4.7 - 21 Jul 2011
  193. - Bug fix: First results we partially hidden when "Don't display the Google
  194. web search dialogues" was selected
  195. - Bug fix: Update banner was hidden below the top black bar
  196. - Bug fix: Removed duplicate did you mean, again! Thanks andi-03!
  197. - Feature: Now using Google favicons as suggested by None Nosome. Cheers!
  198.  
  199. v1.4.6 - 9 Jul 2011
  200. - Bug fix: Missing thumbnail images on subsequent pages of results when auto
  201. load is enabled.
  202. - Bug fix: Trackless links fixed. Thanks @eatmorglue!
  203.  
  204. v1.4.5 - 27 Apr 2011
  205. - Bug fix: Rejiggle after Google altered some bits on there Australian home
  206. page. Thanks @daveo76 for reporting this!
  207.  
  208. v1.4.4 - 20 Feb 2011
  209. - Bug fix: Missing thumbnail images on subsequent pages of results when auto
  210. load is enabled
  211.  
  212. v1.4.3 - 18 Feb 2011
  213. - Bug fix: Changed the browser (GreaseMonkey) detection method to a more
  214. generic function. This should stop problems with FF beta v11+.
  215. Thanks to Babbalucio and Qudeid for identifying the line the error seen in
  216. FFb11 was occuring.
  217. - Layout: Hopefully corrected the removal of duplicate "Did you mean?",
  218. "Showing results for..." and "More results for..." without removing potential
  219. "No results found for...". One day i'll get it right!)
  220. - Layout: Corrected positioning of result stats/search dialogue with instant
  221. search on or off.
  222. - Bug fix: Updated https @includes for the encrypted subdomain as noted
  223. by SeeFood. Thanks!
  224.  
  225. v1.4.2.1 - 17 Feb 2011
  226. - Layout: Moved settings link under the options (gear) icon
  227.  
  228. v1.4.2 - 17 Feb 2011
  229. - Bug fix: Now works with the new top toolbar
  230.  
  231. v1.4.1 - 24 Dec 2010
  232. - Bug fix: Allowed port numbers in the page preview code as per RobinRosengren's
  233. suggestion. Cheers.
  234.  
  235. v1.4 beta - 17 Dec 2010
  236. - Rebuild: Now one script for all browsers (including chrome!) with no
  237. dependencies on any other scripts (opera)
  238. - Bug fix: Corrected the positioning of result numbering
  239. - Bug fix: Removed duplicate did you mean
  240. - Feature: Now you can remove googles Site Preview feature
  241.  
  242. v1.3.8.1 beta - 26 May 2010
  243. - Feature: Changed/updated @includes to allow for https searching as requested
  244. by auscompgeek
  245.  
  246. v1.3.8 - 24 May 2010
  247. - Layout: Position adjustment of loading image and txt for auto load
  248. - Bug fix: Second "Showing results for" prompt is now removed when Google
  249. thinks you have misspelled your search term.
  250. - Bug fix: First "Did you mean" prompt is now removed when Google thinks you
  251. have misspelled your search term.
  252.  
  253. v1.3.7 beta - 10 May 2010
  254. - Bug fix: Certain links in the search tools panel caused a reload of results
  255. but removed the first chunk of them when auto load was turned on.
  256. - Bug fix: Display of end of results notification when auto load is enabled.
  257. - Bug fix: Trackless links were sometimes appearing to early in the results
  258. when translate this page links occur.
  259. - Bug fix: "Show more results from" links now open inline as expected.
  260. - Feature: Update of result stats with auto load enabled.
  261.  
  262. v1.3.6 - 09 May 2010
  263. - Bug fix: Duplicate entries when "Auto load more results" is selected. Looks
  264. like i introduced a bug back in v1.3.0 (Oct 09) during a code clean up. I'd
  265. managed to double quote two regex values that may have resulted in duplicates
  266. appearing when your default "Number of Results" returned by Google was anything
  267. other than 10.
  268. - Bug fix: "More search tools" link removed the first X amount of results from
  269. your search results. Where X is the "Number of results" per page set in your
  270. Google preferences. This has now been resolved.
  271. - Thank you gauravbaadshah! Your (continued) well presented bug reports are
  272. helping to make GoogleMonkeyR as good as it should be!
  273.  
  274. v1.3.5 - 08 May 2010
  275. - Feature: Added the ability to show/remove the "Search Tools" (left panel)
  276. that has appeared in the latest Google update.
  277. - Bug fix: Selectors updated for trackless links. Should now pick up more
  278. results and create the assosiated trackless links.
  279. - Bug fix: Repositioning of key elements when preferences remove "Related
  280. Searches", "Sponsored Links" or "Search Tools".
  281.  
  282. v1.3.4 - 07 May 2010
  283. - Bug fix: Recent Google changes have been addressed in this update. I hope to
  284. have another update shortly that will address some display issues when auto-load
  285. is used and you approach the bottom of the page.
  286.  
  287. v1.3.3 - Unreleased
  288. - Bug fix: All "Did you mean?" prompts were removed when Google thought you had
  289. misspelled your search term. This is now corrected.
  290. Thanks to MasterMind33 for the heads up! Appreciated!
  291. - Bug fix: Trackless links added when Cached/Simlar links don't exist
  292.  
  293. v1.3.2 - 02 Dec 2009
  294. - Bug fix: When you follow links with the .../#hl=... type of format the script
  295. fails to trigger. I've now added the include http://www.google.tld/#*
  296. Big thanks to Hiromacu for finding the bug!
  297.  
  298. v1.3.1 - 10 Oct 2009
  299. - Bug fix: Possible infinite loop bug with /webhp? pages.
  300.  
  301. v1.3.0 - 09 Oct 2009
  302. - Bug fix: When searching using the "on page" search dialogs, the script was
  303. not triggering properly. The fix implemented is only a band-aid and when google
  304. implement more changes, it will fail. I am working on the issue when i get time
  305. - Feature: Added an extra option in preferences to remove the "Related
  306. Search" links that sometimes appear at the top of your search results.
  307. - Feature: Added an extra option in the preferences to select the flow
  308. direction of your results when you use multiple columns. Either left to right
  309. or top to bottom newspaper style. If you use "Auto-load" the newspaper style
  310. is automatically paginated to try and keep some clarity in your results.
  311. - Bug fix: Added the include for "/ig?*" urls (iGoogle)
  312. - Cleanup: Reduced the amount of code for the creation and styling of elements
  313. using the function document.buildElement
  314. - Feature: Now works on "/webhp?*" search urls
  315. Thanks to gauravbaadshah for pointing this out!
  316. - Bug fix: Removed Googles results width limiting
  317.  
  318. v1.2.0 - 02 Jun 2009
  319. - Bug fix: The display of favicons for https links has been removed to stop
  320. invalid certificate warnings whilst searching.
  321. - Bug fix: Error removed when the main link of a result can't be found.
  322. - Feature: Site description text of each search result, when one column of
  323. results is selected, is increased to 95% of the containing cell width as this
  324. seems to be more readable. Two or more columns of results is unchanged as i
  325. found the data appeared to be more cluttered.
  326. As requested by The_Steph.
  327. - Bug fix(ish): Google personalised search (Promote, Remove) functionality
  328. will now work on the initially loaded page of results. All further results
  329. loaded dynamically using the "Auto load" option will NOT!
  330. - Bug fix: "End of search results" wasn't showing up when you'd reached the
  331. end of the results. Now fixed.
  332. - Bug fix: Removal of duplicate "Did you mean:" links at the top of search
  333. results when you've misspelled your search term(s).
  334.  
  335. v1.1.1.2 - 22 Nov 2008
  336. - Bug fix: Another fix for the latest Google changes. Hopefully across the
  337. board this time.
  338.  
  339. v1.1.1.1 - 21 Nov 2008
  340. - Bug fix: Quick (ish) fix for the latest Google changes. Sorry on my hols!)
  341.  
  342. v1.1.1.0 - 03 Nov 2008
  343. - Feature: Addition of favicons next to the main link. Configurable via a
  344. checkbox in the preferences.
  345. As requested by Pierre75007.
  346.  
  347. v1.1.0.0 - 03 Nov 2008
  348. - Feature: Addition of GooglePreview images in your search results. Open up the
  349. GoogleMonkeyR preferences to turn this feature on.
  350. As requested by Nasir Jones.
  351. - Bug fix: Open in new target now overpowers any settings specified in your
  352. Google preferences.
  353.  
  354. v1.0.9.1 - 30 Oct 2008
  355. - Bug fix: Ooops. I messed up the z-index of the preferences screen in the last
  356. version. It was appearing behind the blocker. All fixed in this update.
  357.  
  358. v1.0.9 - 30 Oct 2008
  359. - Feature: Moved the related searches and blog entries etc. to the top of the
  360. results.
  361. - Cleanup: Commented out a GM_log entry i left in in the last update.
  362. - Bug fix: Version comparison now compares numbers rather than strings. Ooops.
  363. - Bug fix: Base numbering of 2nd, 3rd, 4th... pages of results restored (when
  364. auto load more results is turned off).
  365.  
  366. v1.0.8.9 - 23 Oct 2008
  367. - Bug fix: Auto load more results is back up and running. Google has removed
  368. the id attribute from the Next link at the bottom of their results page. Had
  369. to find it a different way.
  370. - Cleanup: encodeURI of the history information. (to maybe help with the crash)
  371. - Cleanup: Removal of an extra preferences bind that seems to have crept in
  372. at the end of the script (to maybe help with the crash)
  373.  
  374. v1.0.8.8 - 14 Oct 2008
  375. - Bug fix: Results table and column widths should now be more stable. Less
  376. re-sizing as links are clicked and/or more results auto-load.
  377. - Bug fix: Refined the stylesheet code that gives the results the background
  378. hue. This was to stop other elements getting the same hue.
  379. - Bug fix: Added trackless link to each result regardless of whether your
  380. logged into a Google account or not.
  381. - Bug fix: With the google search dialogs removed sometimes a message reading
  382. "Personalized based on your web history." overlays the GoogleMonkeyR link.
  383. This has now been adjusted to sit below the links.
  384. - Cleanup: XPath functions added to the document object.
  385.  
  386. v1.0.8.7 - 05 Oct 2008
  387. - Cleanup: Change of the update url to point at the script meta file
  388. "http://userscripts.org/scripts/source/9310.meta.js"
  389. this will reduce the bandwidth to/from userscripts.org and speed up checks
  390. - Cleanup: Change of several method names to aid readability
  391. - Cleanup: "Update bar" code re-written more cleanly
  392.  
  393. v1.0.8.6 - 01 Oct 2008
  394. - Cleanup: Change of includes to use "Magic top-level domains" instead of *'s
  395. see http://wiki.greasespot.net/Magic_TLD for more info
  396. - Cleanup: Change of update script to pick up history text more cleanly
  397.  
  398. v1.0.8.5 bug fix - 25 Sep 2008
  399. - Bug fix: History update fix 2
  400.  
  401. v1.0.8.4 bug fix - 25 Sep 2008
  402. - Bug fix: History update fix
  403.  
  404. v1.0.8.3 bug fix - 23 Sep 2008
  405. - Bug fix: Final fix with the auto update script
  406.  
  407. v1.0.8.2 bug fix - 23 Sep 2008
  408. - Bug fix: Another small bug fix with the auto update script
  409.  
  410. v1.0.8.1 bug fix - 23 Sep 2008
  411. - Bug fix: Small bug fix with the auto update script
  412.  
  413. v1.0.8 - 23 Sep 2008
  414. - Feature: The update feature of the script has been completely re-written
  415. to notify the user when there are future updates. This update mechanism
  416. will also work if (and when) Google decide to change their DOM again! The
  417. basis for this update method comes from the "UserScript Update Notification"
  418. script from Seifer. This code has been heavily modified and expanded for
  419. the GoogleMonkeyR script.
  420.  
  421. v1.0.7 bug fix - 17 Sep 2008
  422. - Bug fix: Roll up pack of bug fixes. Should be ok for now!
  423.  
  424. v1.0.6.3 beta bug fix - 21 Aug 2008
  425. - Bug fix: Some localisations of Google changed again on the 19th Aug. The DOM structure has again
  426. been modified. Oh when will they stop messing with it?
  427.  
  428. v1.0.6.2 beta bug fix - 13 Aug 2008
  429. - Bug fix: Some localisations of Google changed again on the 12th Aug. The DOM structure has again
  430. been modified. More changes to follow? I hope not!
  431. This is a beta update to fix these problems but may have its own bugs!!!
  432. - Feature: Added ability to change the background hue or the border color of the search results
  433.  
  434. v1.0.6.1 beta bug fix - 01 Aug 2008
  435. - Bug fix: Some localisations of Google changed on the 31st July.
  436. The DOM structure was quite heavily modified and somehow they messed up the
  437. scroll to bottom of page detection.
  438. This is a beta update to fix these problems but may have its own bugs!!!
  439. - Bug fix: Autoload would flood requests to Google for the next page of results.
  440. Now only one request is sent until a response is received
  441. - Bug fix: Background hue now defaults to transparent rather than white.
  442. Thanks to Lil Junior for the suggestion!
  443.  
  444. v1.0.6 - 19 Apr 2008
  445. - Bug fix: Corrected the display of the preferences screen in Firefox 3
  446. - Bug fix: Corrected the removal of web search dialogs (after an update on google)
  447. - Bug fix: Natural numbering of 2nd, 3rd, 4th... pages of results.
  448. Thanks to theMoJo for the natural numbering sample code!
  449.  
  450. v1.0.5 - 24 Oct 2007
  451. - Bug fix: Natural indentation of multiple results from the same site restored
  452. - Bug fix: Google news entries within results no longer breaks the layout and numbering
  453. - Feature: Added ability to change (or remove) the background hue of the search results
  454. NB* Color picker code borrowed, then heavily modified, from Flooble.com
  455.  
  456. v1.0.4 - 25 May 2007
  457. - Bug fix: Removed the visually anoying bug where when you clicked on a "long" link it resized the whole
  458. cell container before taking you to your link. Grrrr.
  459.  
  460. v1.0.3 - 20 May 2007
  461. - Bug fix: "Open results in a new target" would only work for the initially loaded results, not subsequent
  462. additions by the auto loader
  463. - Bug fix: Limit the column width to always fit on screen without scroll. As requested by Edward Rapley
  464. NB* This fix only works when your being reasonable! If you want 4 columns of results on an 800x600
  465. screen you'll have trouble. Works best with the "Sponsored Links" removed
  466. - Feature: Added an entry to the Greasemonkey user script commands to allow opening of the GoogleMonkeyR
  467. preferences. This is just in case Google decide to alter their site in a way that removes the
  468. GoogleMonkeyR link from the top of the page.
  469. - Feature: Ability to disable Google tracking your search results
  470. NB* Every time you click a link in your search results, the click gets reported back to Google for
  471. their statisticians to ponder over. If you are signed in to a Google account this click will
  472. be recorded in your search history. This allows you to remove this reporting to Google.
  473. - Feature: When the Disable Google tracking option is not active, an extra "Trackless" link is added
  474. in the "Cached", "Similar pages" links of each of the search results, so you can decide whether
  475. to be tracked at the time!
  476.  
  477. v1.0.2 - 18 May 2007
  478. - Now uses userscripts.org as the download location for future updates
  479.  
  480. v1.0.1 - 16 May 2007
  481. - clean up of the code to use more of the this keyword rather than working round the issue by using the
  482. document as a patsy
  483.  
  484. EndHistory */
  485. // ==/UserScript==
  486.  
  487.  
  488.  
  489. /**
  490. * Processing of the current page.
  491. **/
  492. (function(){
  493. var UIL =
  494. {
  495. scriptName : "GoogleMonkeyR",
  496. scriptVersion : "v.1.7.3.1",
  497. scriptId : "9310",
  498. watching : false,
  499.  
  500. init : function()
  501. {
  502. var pageType = this.determineCurrentPageType();
  503. //monkeyr.log(pageType);
  504. if(pageType !== null)
  505. {
  506. this.processPage(pageType);
  507. }
  508. else
  509. {
  510. var self = arguments.callee;
  511. setTimeout(self.bind(this),100);
  512. }
  513. },
  514.  
  515. determineCurrentPageType : function()
  516. {
  517. var pageType = null;
  518. var loc = window.location.href.toLowerCase();
  519. if (loc.indexOf("/ig?") != -1)
  520. {
  521. pageType = "igoogle";
  522. }
  523. else if (loc.indexOf("tbm=isch") != -1)
  524. {
  525. pageType = "image";
  526. }
  527. else if (loc.indexOf("tbm=shop") != -1)
  528. {
  529. pageType = "shopping";
  530. }
  531. else if (loc.indexOf("/webhp?") != -1)
  532. {
  533. this.instant = true;
  534. pageType = "search";
  535. }
  536. else if ((loc.indexOf("/search?") != -1))
  537. {
  538. this.instant = false;
  539. pageType = "search";
  540. }
  541. else if ((loc.indexOf(window.location.protocol + '//' + window.location.hostname + '/#') != -1))
  542. {
  543. this.instant = true;
  544. pageType = "search";
  545. }
  546. else if (window.location.href==(window.location.protocol + '//' + window.location.hostname + '/'))
  547. {
  548. this.instant = true;
  549. pageType = "search";
  550. }
  551. return pageType;
  552. },
  553.  
  554. processPage : function(pageType)
  555. {
  556. if (pageType !== null)
  557. {
  558. var pageProcessor = pageType + "PageProcessor";
  559. if (typeof(this[pageProcessor]) == "function")
  560. {
  561. this.hideSearch = UIL.Config.getHideSearch();
  562. this.numResults = UIL.Config.getNumResults();
  563. this.numColumns = UIL.Config.getNumCol();
  564. this.newspaper = UIL.Config.getResultFlow() != "l2r";
  565. this.noSitePreview = UIL.Config.getNoSitePreview();
  566. this.autoLoad = UIL.Config.getAutoLoad();
  567. this.favIcon = UIL.Config.getFavIcon();
  568. this.externalLinksResults = UIL.Config.getExtLinkSearch();
  569. this.searchLinkTracking = UIL.Config.getSearchLinkTracking();
  570. this.searchesRelatedTo = UIL.Config.getSearchesRelatedTo();
  571. this.imagePreview = UIL.Config.getImagePreview();
  572. this.remSponsor = UIL.Config.getRemSponsor();
  573. this.remRightPanel = UIL.Config.getRemRightPanel();
  574. this.resHue = UIL.Config.getResHue();
  575. this.bGBorder = UIL.Config.getBGBorder();
  576. this.backToTopLinkInsert = true;
  577. this.backToTopLinkShow = true;
  578. // this.scrollHeight = 0;
  579. // this.winInnerHeight = 0;
  580. this.initialise = true;
  581.  
  582. this[pageProcessor]();
  583. }
  584. }
  585. },
  586.  
  587. igooglePageProcessor : function()
  588. {
  589. if(this.hideSearch)
  590. {
  591. var searchEle = document.getElementById("gsea");
  592. if(searchEle)
  593. {
  594. searchEle.style.display="none";
  595. }
  596. }
  597. this.externalLinks(document, UIL.Config.getExtLinkiGoogle());
  598. },
  599.  
  600. searchPageProcessor : function()
  601. {
  602. var watch, that=this
  603. if(this.watching)
  604. {
  605. watch = document.querySelector(this.watching);
  606. watch.addEventListener("DOMNodeInserted", function(e){
  607. monkeyr.log('inserted', e.target);
  608. that.whackTest('inserted', e);
  609. }, false);
  610. watch.addEventListener("DOMSubtreeModified", function(e){
  611. monkeyr.log('subtree', e.target, e.attrName, e.newValue, e.prevValue, e)
  612. that.whackTest('subtree', e);
  613. }, false);
  614. watch.addEventListener("DOMAttrModified", function(e){
  615. monkeyr.log('attribute', e.target, e.attrName, e.newValue, e.prevValue, e);
  616. that.whackTest('attribute', e);
  617. }, false);
  618. watch.addEventListener("DOMNodeRemoved", function(e){
  619. monkeyr.log('removed', e.target);
  620. that.whackTest('removed', e);
  621. }, false);
  622. // var observer = new MutationObserver(function(mutations) {
  623. // mutations.forEach(function(e) {
  624. // if(e.type!='childList'){
  625. // if(e.target.getAttribute(e.attributeName) != e.oldValue){
  626. // monkeyr.log('mutation', e.type, e.target, e.attributeName, e.target.getAttribute(e.attributeName), e.oldValue);
  627. // }
  628. // }
  629. // else{
  630. // monkeyr.log('mutation', e.type, e.target, e.addedNodes, e.removedNodes);
  631. // }
  632. // that.whackTest('mutation', e);
  633. // });
  634. // });
  635. // observer.observe(watch, {
  636. // attributes: true,
  637. // childList: true,
  638. // characterData: true,
  639. // subtree: true,
  640. // attributeOldValue: true
  641. // });
  642. return;
  643. }
  644. else
  645. {
  646. watch = document.querySelector('#main');
  647. watch.addEventListener("DOMNodeInserted", this.DOMNodeInsertedWatcher.bind(this), false);
  648. watch.addEventListener("DOMNodeRemoved", this.DOMNodeRemovedWatcher.bind(this), false);
  649. watch.addEventListener("DOMSubtreeModified", this.DOMSubtreeModifiedWatcher.bind(this), false);
  650. watch.addEventListener("DOMAttrModified", this.DOMAttrModifiedWatcher.bind(this), false);
  651.  
  652. // if(typeof MutationObserver === 'function')
  653. // {
  654. // // Only firefox and chrome currently support MutationObserver
  655. // var observer = new MutationObserver(function(mutations) {
  656. // mutations.forEach(that.MutationObserver.bind(that))
  657. // });
  658. // observer.observe(watch, {
  659. // attributes: true,
  660. // childList: false,
  661. // characterData: true,
  662. // subtree: true,
  663. // attributeOldValue: true
  664. // });
  665. // }
  666. // else
  667. // {
  668. // // 4 opera
  669. // watch.addEventListener("DOMSubtreeModified", this.DOMSubtreeModifiedWatcher.bind(this), false);
  670. // watch.addEventListener("DOMAttrModified", this.DOMAttrModifiedWatcher.bind(this), false);
  671. // }
  672. }
  673.  
  674. if(!this.instant)
  675. {
  676. this.registerControls();
  677. this.whackDom();
  678. }
  679.  
  680. var style = ''
  681. //style += (" #cnt #center_col {width:auto !important; max-width:100% !important;} #cnt #foot, .mw {margin-left:0 !important; width:auto !important; max-width:100% !important;} #rhs {left:auto; !important}#botstuff .sp_cnt,#botstuff .ssp, #ires{display:none !important} .s{max-width:98%!important;} .vshid{display:inline} #res h3.r {white-space:normal}");
  682. style += ("#cnt.singleton #center_col, #cnt.singleton #foot, .mw {width:auto !important; max-width:100% !important;} #rhs {left:auto !important; position:absolute}#botstuff .sp_cnt,#botstuff .ssp, #ires, .rgsep{display:none} div.col {width: 100% !important} .s{max-width:100%!important;} .vshid{display:inline} .ab_dropdown ul{list-style:none} #GTR *{white-space:normal!important} /*.ads-ad, ._cwc, .card-section {width: 1200px}*/ #GTR{border-spacing:5px} #rcnt .col:nth-of-type(3){width:100%!important} #rcnt .col:nth-of-type(4){float: none; right: 0px; top: -140px; width:100% !important} .vk_c.card-section {max-width:1200px} g-section-with-header {margin:0 !important; max-width:98%;}");
  683. style += ("div#scrollTop a {background:url("+UIL.RES.TOP_PNG+") transparent;border-radius: 10px 10px 10px 10px;bottom: 30px;height: 40px;position: fixed;right: 30px;width: 40px;z-index: 10000;}div#scrollTop a{-webkit-transition: opacity 1.0s ease;-moz-transition: opacity 1.0s ease;-o-transition: opacity 1.0s ease;0} div#scrollTop a.mh_show{opacity: 0.2} div#scrollTop a.mh_hide{opacity: 0}div#scrollTop a:hover{-webkit-transition: opacity .5s ease;-moz-transition: opacity .5s ease;-o-transition: opacity .5s ease;opacity: 0.5;}");
  684.  
  685. if(this.numColumns>1)
  686. {
  687. style += ("#cnt.singleton #center_col, #cnt.singleton #foot, .mw {margin-left:0 !important;}");
  688. }
  689.  
  690. if(this.autoLoad)
  691. {
  692. style += ("#loadingimg {width:180px;height:34px;background-image:url(" + UIL.RES.LOADING_GIF + ");background-repeat:no-repeat;margin:2em auto auto auto;padding:10px;display:none;} #loadingimg p{font-size:130%;font-weight:bold;padding-left:40px;margin:0;float:left} #loadingimg a{text-align: left; float: left;margin: 2px 10px;}");
  693. }
  694.  
  695. if(this.hideSearch)
  696. {
  697. // style += ("#rcnt{margin-top:1em} #sfcnt,#sftr,#searchform{display:none!important;}#cnt{padding:0}#cnt .mw:first-child{position:absolute;top:4.5em;right:0}#rshdr .sfcc{position:absolute;top:2em;right:0}");
  698. style += ("#ab_ctls,#ab_name,#resultStats{top:0} #gb,#gb.gbes,#gb.gbesi,#gb.gbem,#gb.gbemi{height:0!important}#gbx1,#gbx2{height:0!important}#gbq2[class='gbt'] #gbqfw{display:none;}#main{margin-top:44px!important}#gbu{margin-right:232px!important}");
  699. //document.getElementById('gbq').addEventListener("DOMAttrModified", this.resizeWatcher, false);
  700. //this.resizeWatcher(true);
  701. }
  702.  
  703. if(this.remSponsor)
  704. {
  705. style += ("#tvcap, #tads, #topstuff table.ts, #bottomads{display:none;}");
  706. }
  707.  
  708. // if(this.noSitePreview)
  709. // {
  710. // style += (".vspib {display:none}");
  711. // }
  712.  
  713. if(this.searchesRelatedTo)
  714. {
  715. style += ("#botstuff #brs{display:none;} #topstuff .tqref{display:none;}");
  716. }
  717.  
  718. // if(this.remRightPanel)
  719. // {
  720. // style += ("#rhs {display:none}");
  721. // }
  722.  
  723. if(this.numResults)
  724. {
  725. style += ("#res h3.r {display:inline}");
  726. }
  727.  
  728. var hue = this.resHue;
  729. if(hue.length==0)
  730. {
  731. hue = "transparent";
  732. }
  733.  
  734. var BGBorder;
  735. if(this.bGBorder=='background')
  736. {
  737. BGBorder = "background-color:";
  738. }
  739. else
  740. {
  741. BGBorder = "border: 1pt solid ";
  742. }
  743.  
  744. var imagePreview = "";
  745. if(this.imagePreview)
  746. {
  747. imagePreview = "min-height:102px;";
  748. }
  749.  
  750. // style += ("#side_tab a {color:#444;background-color:"+hue+";border: meduim none;box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.2);font-weight: bold;padding: 3px 14px;margin-top: 50px;text-decoration: none;border-radius: 6px 6px 0 0;transform: rotate(-90deg);-webkit-transform: rotate(-90deg);-moz-transform: rotate(-90deg);filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);position: absolute;}#side_tab{float: right;height: 100px;position: absolute;right: -50px;width: 100px;z-index:-10000000}#rhs_block{float:right;}");
  751. // style += (".side_out{-webkit-transform: translate(100%,0);-moz-transform: translate(100%,0);-o-transform: translate(100%,0);transition: all 2s ease-in-out;}#side_tab a:hover + .side_out{-webkit-transform: translate(-200%,0);-moz-transform: translate(-200%,0);-o-transform: translate(-100%,0);transition: all 2s ease-in-out;}");
  752.  
  753. // +TA - style fix
  754. style += ("#center_col .kp-blk {max-width: 60%} #GTR li.g, #GTR div.g {margin:.25em !important;" + BGBorder + " "+ hue +" ! important; padding:0 0 .5em ! important; } li.g {list-style:none outside none;"+imagePreview+"};");
  755.  
  756. if(!this.watching)this.addStyle("@namespace url(http://www.w3.org/1999/xhtml); "+style);
  757.  
  758. if((rhs = document.getElementById('rhs'))){
  759. this.rightPanelAdjuster(rhs);
  760. }
  761.  
  762. // setInterval(this.watchTimer.bind(this),500);
  763. // //monkeyr.log('google.timers.load.t.prt')
  764. // monkeyr.log(window);
  765. },
  766.  
  767. imagePageProcessor : function()
  768. {
  769. this.registerControls();
  770. var style = '';
  771. style += ("div#scrollTop a {background:url("+UIL.RES.TOP_PNG+") transparent;border-radius: 10px 10px 10px 10px;bottom: 30px;height: 40px;position: fixed;right: 30px;width: 40px;z-index: 10000;}div#scrollTop a{-webkit-transition: opacity 1.0s ease;-moz-transition: opacity 1.0s ease;-o-transition: opacity 1.0s ease;0} div#scrollTop a.mh_show{opacity: 0.2} div#scrollTop a.mh_hide{opacity: 0}div#scrollTop a:hover{-webkit-transition: opacity .5s ease;-moz-transition: opacity .5s ease;-o-transition: opacity .5s ease;opacity: 0.5;}");
  772. this.showBackToTopLink(true);
  773. // style += ("#cnt #center_col, #cnt #foot, .mw {width:auto !important; max-width:100% !important;} #rhs {left:auto; !important}#botstuff .sp_cnt,#botstuff .ssp, #ires{display:none} .s{max-width:98%!important;} .vshid{display:inline} #res h3.r {white-space:normal}");
  774. if(this.hideSearch)
  775. {
  776. // style += ("#rcnt{margin-top:1em} #sfcnt,#sftr,#searchform{display:none!important;}#cnt{padding:0}#cnt .mw:first-child{position:absolute;top:4.5em;right:0}#rshdr .sfcc{position:absolute;top:2em;right:0}");
  777. style += ("#ab_ctls,#ab_name,#resultStats{top:0} #gb,#gb.gbes,#gb.gbesi,#gb.gbem,#gb.gbemi{height:0!important}#gbx1,#gbx2{height:0!important}#gbq2[class='gbt'] #gbqfw{display:none;}#main{margin-top:0!important}");
  778. // document.getElementById('gbq').addEventListener("DOMAttrModified", this.resizeWatcher, false);
  779. //this.resizeWatcher(true);
  780. }
  781.  
  782. if(this.remSponsor)
  783. {
  784. style += ("#center_col, #foot {margin-right: 0 !important;} #rhs, #tads, #topstuff table.ts, #bottomads{display:none;}");
  785. }
  786.  
  787. if(this.searchesRelatedTo)
  788. {
  789. style += ("#botstuff #brs{display:none;} #topstuff .tqref{display:none;}");
  790. }
  791.  
  792. this.addStyle("@namespace url(http://www.w3.org/1999/xhtml); "+style);
  793. },
  794.  
  795. whackTest : function(from, e)
  796. {
  797. // if(from=='subtree' && e.target.id=='nyc' && e.target.className=='rhstc5'){
  798. // monkeyr.logA('whackTest TRIGGER')
  799. // return true;
  800. // }
  801. if(from=='inserted' && e.target.id=='navcnt'){
  802. monkeyr.logA('whackTest DOM TRIGGER');
  803. return 'dom';
  804. }
  805. // else if(from=='mutation' && e.target.id=='xfoot' && e.attributeName=='style' && e.target.style.visibility==''){
  806. // monkeyr.logA('whackTest img TRIGGER');
  807. // // return 'img';
  808. // }
  809. // else if(from=='attribute' && e.target.id=='pnnext' && e.attrName=='href'){
  810. // monkeyr.logA('whackTest lnk TRIGGER', this);
  811. // this.getAutoLoadParams();
  812. // }
  813. return false;
  814. },
  815.  
  816. DOMNodeInsertedWatcher : function(e)
  817. {
  818. monkeyr.logE('inserted', e.target)
  819. if(e.target.id == 'ab_ctls' || e.target.id == 'hdtb')
  820. {
  821. this.registerControls();
  822. }
  823. else if(e.target.id == 'rhs'){
  824. this.rightPanelAdjuster(e.target);
  825. }
  826. if(this.whackTest('inserted', e)=='dom') this.whackDom();
  827. // if(this.whackTest('inserted', e)=='img') this.whackImages(document);
  828. },
  829.  
  830. MutationObserver : function(e)
  831. {
  832. if(e.type!='childList'){
  833. if(e.target.getAttribute(e.attributeName) != e.oldValue){
  834. monkeyr.logE('mutation', e.type, e.target, e.attributeName, e.target.getAttribute(e.attributeName), e.oldValue);
  835. }
  836. }
  837. else{
  838. monkeyr.logE('mutation', e.type, e.target, e.addedNodes, e.removedNodes);
  839. }
  840. if(this.whackTest('mutation', e)=='dom') this.whackDom();
  841. // if(this.whackTest('mutation', e)=='img') this.whackImages(document);
  842. },
  843.  
  844. DOMSubtreeModifiedWatcher : function(e)
  845. {
  846. monkeyr.logE('subtree', e.target, e.attrName, e.newValue, e.prevValue, e)
  847. // monkeyr.logE('subtree', e.target, e.attributeName, e.target.getAttribute(e.attributeName), e.oldValue)
  848. // if(this.whackTest('subtree', e)) this.whackDom();
  849. if(this.whackTest('subtree', e)=='dom') this.whackDom();
  850. // if(this.whackTest('subtree', e)=='img') this.whackImages(document);
  851. },
  852.  
  853. DOMAttrModifiedWatcher : function(e)
  854. {
  855. monkeyr.logE('attribute', e.target, e.attrName, e.newValue, e.prevValue, e)
  856. // monkeyr.logE('subtree', e.target, e.attributeName, e.target.getAttribute(e.attributeName), e.oldValue)
  857. // if(this.whackTest('subtree', e)) this.whackDom();
  858. if(this.whackTest('attribute', e)=='dom') this.whackDom();
  859. // if(this.whackTest('attribute', e)=='img') this.whackImages(document);
  860. },
  861.  
  862. DOMNodeRemovedWatcher : function(e)
  863. {
  864. monkeyr.logE('removed', e.target)
  865. if(e.target.id == 'GTR')
  866. {
  867. monkeyr.log('GTR REMOVED')
  868. this.initialise = true;
  869. clearTimeout(this.watchForScrollTimer);
  870. }
  871. },
  872.  
  873.  
  874. whackDom : function()
  875. {
  876. if(!document.getElementById('GTR')){
  877. clearTimeout(this.whackDomTimeOut);
  878. this.whackDomTimeOut = setTimeout(function()
  879. {
  880. var ires = document.getElementById('ires');
  881. if(ires){
  882. monkeyr.log('!!!!! Whacking DOM !!!!!')
  883. var extrares = document.getElementById('extrares');
  884. var res = document.getElementById('res');
  885. monkeyr.log(extrares, res , this.autoLoad)
  886. if(extrares && res && this.autoLoad){
  887. extrares.parentNode.insertBefore(res, extrares);
  888. }
  889. if(this.hideSearch)
  890. {
  891. // this.resizeWatcher(true);
  892. }
  893. if(!this.buildResultTable()){
  894. return;
  895. }
  896. if(this.autoLoad)
  897. {
  898. if(this.getAutoLoadParams() && this.insertLoadingImage())
  899. {
  900. //monkeyr.log('watchForScroll');
  901. this.watchForScroll.bind(this)();
  902. }
  903. }
  904.  
  905. this.processResults(document.getElementById('center_col'))
  906. ires.parentNode.removeChild(ires);
  907. this.initialise = false;
  908. }
  909. }.bind(this),0);
  910. }
  911. },
  912.  
  913. resizeWatcher : function(e)
  914. {
  915. //monkeyr.log(e.target.id)
  916. if(e===true || (e.target && e.target.id == 'gbq'))
  917. {
  918. setTimeout(function(){
  919. //monkeyr.log('here')
  920. //left side
  921. var glogo = document.getElementById('gbq1');
  922. var ab_name = document.getElementById('ab_name');
  923. var ab_ctls = document.getElementById('ab_ctls');
  924. var resultStats = document.getElementById('resultStats');
  925. var gbu = document.getElementById('gbu');
  926. var appbar = document.getElementById('appbar');
  927.  
  928. var glogoPos = findPos(glogo);
  929. //monkeyr.log(glogoPos)
  930. lft = glogoPos[0] + glogo.offsetWidth + 20;
  931. ab_name.style.marginLeft = lft+'px'
  932. resultStats.style.marginLeft = (lft+ab_name.offsetWidth+50)+'px'
  933.  
  934. //right side
  935. //monkeyr.log(getStyle(gbu, 'margin-right'))
  936. ab_ctls.style.right = (gbu.offsetWidth + getStyle(gbu, 'margin-right') + 10 )+'px';
  937.  
  938. //heights
  939. //monkeyr.log(gbu.offsetHeight)
  940. ab_ctls.style.marginTop = getStyle(gbu, 'padding-top')+'px'
  941. ab_name.style.marginTop = (getStyle(gbu, 'padding-top')+3)+'px'
  942. resultStats.style.marginTop = (getStyle(gbu, 'padding-top')+10)+'px'
  943. appbar.style.height = (gbu.offsetHeight)+'px'
  944.  
  945. }, 0);
  946.  
  947. }
  948. },
  949.  
  950. rightPanelAdjuster : function(el)
  951. {
  952. if(el && (center_col = document.getElementById('center_col')) && (foot = document.getElementById('foot'))){
  953. monkeyr.log('----rhs stuff----', el, this.remSponsor, this.remRightPanel);
  954. if(this.remSponsor && (mbEnd = document.getElementById('mbEnd'))){
  955. monkeyr.log('rem mbEnd', mbEnd);
  956. mbEnd.parentNode.removeChild(mbEnd);
  957. }
  958. if(this.remSponsor && (rhsvw = el.querySelector('div#rhs_block > div.rhsvw'))){
  959. monkeyr.log('rem .rhsvw');
  960. rhsvw.parentNode.removeChild(rhsvw);
  961. }
  962. if(el.offsetHeight > 50){
  963.  
  964. monkeyr.log('el.offsetWidth:',el.offsetWidth,'el.offsetHeight',el.offsetHeight)
  965. var div = document.buildElement('div', {id:'slideout_tab'}, 'more info'),
  966. width = el.offsetWidth,
  967. height = el.offsetHeight,
  968. css = "#slideout_tab{color:#444;border:meduim none;background-color: #fff;box-shadow:0 -1px 3px rgba(0,0,0,0.2);font-weight:bold;padding:3px 14px;margin:50px 0 0 -22px;text-decoration:none;width:65px;border-radius:6px 6px 0 0;transform:rotate(-90deg);-webkit-transform:rotate(-90deg);}.slideout{border-radius:5px 0 0 5px;right:0;padding:12px 0;position:absolute;text-align:center;top:10px;transition:all .3s ease-in-out;-webkit-transition:all .3s ease-in-out;width:35px;overflow:hidden;min-width:0!important;height:105px;}.slideout_inner{background-color:#fff;padding:0;position:absolute;text-align:left;top:0;width:0;margin-left:35px;width:"+width+"px!important;}.slideout:hover,.start_out{width:"+(width+60)+"px!important;height:"+height+"px!important;}.start_in{transition:all 0s ease;-webkit-transition:all 0s ease;}";
  969.  
  970. var style = document.getElementById('side_tab_style');
  971. if(!style){
  972. style = document.buildElement('style', {type:'text/css', id:'side_tab_style'});
  973. if (style.styleSheet){
  974. style.styleSheet.cssText = css;
  975. } else {
  976. style.appendChild(document.createTextNode(css));
  977. }
  978. el.appendChild(style);
  979. }
  980. if(this.remRightPanel){
  981. setTimeout(function(){el.className = el.className.replace(' start_in','');},500)
  982. el.className = el.className + ' start_in';
  983. }
  984. else{
  985. setTimeout(function(){el.className = el.className.replace(' start_out','');},2000)
  986. el.className = el.className + ' start_out';
  987. }
  988. el.className = el.className + ' slideout';
  989. var t = el.firstChild;
  990. el.insertBefore(div, el.firstChild);
  991. t.className = t.className + " slideout_inner";
  992.  
  993. center_col.style.marginRight = '0px';
  994. foot.style.marginRight = '0px';
  995.  
  996. // center_col.style.marginRight = el.offsetWidth + 'px';
  997. // foot.style.marginRight = el.offsetWidth + 'px';
  998. }
  999. else{
  1000. center_col.style.marginRight = '0px';
  1001. foot.style.marginRight = '0px';
  1002. }
  1003. }
  1004. },
  1005.  
  1006. insertEndText : function()
  1007. {
  1008. monkeyr.log('insertEndText');
  1009. var elem = document.buildElement('table',{id:"endtext" ,width: "100%", cellspacing: "2", cellpadding: "0", border: "0", "class": "t bt",
  1010. style:"font-weight:bold;text-decoration:blink"}, " End of the search results");
  1011. var res = document.getElementById("res");
  1012. res.parentNode.insertBefore(elem, res.nextSibling);
  1013. return elem;
  1014. },
  1015.  
  1016. reqMoreRes : function()
  1017. {
  1018. if (this.requested == this.startNumber)
  1019. {
  1020. return;
  1021. }
  1022. else
  1023. {
  1024. this.requested = this.startNumber;
  1025. this.loadingImage.style.display = "block";
  1026. var query = this.query.replace(/start=\d*/,"start=" + this.startNumber);
  1027. this.nextLink.href = query;
  1028. monkeyr.log('reqMoreRes '+ query);
  1029. // monkeyr.log('reqMoreRes', this.startNumber, query);
  1030. this.UI.getURL(query, this.processResults.bind(this));
  1031. }
  1032. },
  1033.  
  1034. remainingScroll : function()
  1035. {
  1036. var ret = (document.body.scrollHeight - window.pageYOffset - window.innerHeight);
  1037. return ret;
  1038. },
  1039.  
  1040. watchForScroll : function()
  1041. {
  1042. var self = arguments.callee;
  1043. // if (this.remainingScroll() < 300 && !this.requestingMoreResults && Math.abs(this.scrollHeight - document.body.scrollHeight)>5 && !this.initialise && document.getElementById('GTR')) {
  1044. if (this.remainingScroll() < 300 && !this.requestingMoreResults && !this.initialise && document.getElementById('GTR')) {
  1045. //monkeyr.log('watchForScroll', this.scrollHeight, document.body.scrollHeight, this.winInnerHeight, window.innerHeight, window.pageYOffset)
  1046. // monkeyr.log('watchForScroll '+this.remainingScroll());
  1047. this.requestingMoreResults=true;
  1048. this.reqMoreRes();
  1049. this.scrollHeight = document.body.scrollHeight;
  1050. this.winInnerHeight = window.innerHeight;
  1051. }
  1052. else if(this.backToTopLinkInsert == window.pageYOffset > window.innerHeight*.5){
  1053. this.insertBackToTopLink(this.backToTopLinkInsert);
  1054. }
  1055. else if(this.backToTopLinkShow == window.pageYOffset > window.innerHeight*.75){
  1056. this.showBackToTopLink(this.backToTopLinkShow);
  1057. }
  1058. this.watchForScrollTimer = setTimeout(self.bind(this),100);
  1059. },
  1060.  
  1061. insertLoadingImage : function()
  1062. {
  1063. monkeyr.log('insertLoadingImage');
  1064. var nextLink = document.getElementByXPath("//table[@id='nav']//td[last()]/a");
  1065. var navbar = document.getElementByXPath("//table[@id='nav']//td/ancestor::table");
  1066. var loadingimg = document.getElementById('loadingimg');
  1067. if(navbar)
  1068. {
  1069. navbar.style.display = "none";
  1070. if(!loadingimg)
  1071. {
  1072. var div = document.buildElement('div', {id:''});
  1073. var p = document.buildElement('p', {}, "");
  1074. var a = document.buildElement('a',{href:nextLink.href}, '');
  1075. div.appendChild(p);
  1076. div.appendChild(a);
  1077. this.nextLink = a;
  1078. navbar.parentNode.insertBefore(div, navbar)
  1079. this.loadingImage = div;
  1080. }
  1081. }
  1082. if(!this.endText)
  1083. {
  1084. this.endText = this.insertEndText();
  1085. }
  1086. this.endText.style.display = nextLink && (nextLink.href.indexOf('start=')!=-1) ? 'none' : 'block';
  1087. //monkeyr.log('insertLoadingImage '+nextLink);
  1088. //this.loadingImage.style.display = 'block'
  1089. return nextLink
  1090. },
  1091.  
  1092. insertBackToTopLink : function(insert)
  1093. {
  1094. var a = document.querySelector('#scrollTop a');
  1095. if(insert && !a){
  1096. var div = document.buildElement('div', {id:'scrollTop'});
  1097. a = document.buildElement('a', {href:'#top', 'class':'mh_hide'},'', 'click', function(e){
  1098. e.preventDefault();
  1099. e.stopPropagation();
  1100. document.querySelector("body").scrollIntoView();
  1101. });
  1102. div.appendChild(a);
  1103. document.body.appendChild(div);
  1104. }
  1105. a.style.display = ((insert) ? "inline" : "none");
  1106. this.backToTopLinkInsert = !insert;
  1107. return a;
  1108. },
  1109.  
  1110. showBackToTopLink : function(show)
  1111. {
  1112. var a = document.querySelector('#scrollTop a');
  1113. if(!a){
  1114. a = this.insertBackToTopLink(true);
  1115. }
  1116. this.backToTopLinkShow = !show
  1117. a.className = ((show) ? "mh_show" : "mh_hide");
  1118. },
  1119.  
  1120. getAutoLoadParams : function()
  1121. {
  1122. // monkeyr.log('getAutoLoadParams');
  1123. var nextLink = document.getElementByXPath("//table[@id='nav']//td[last()]/a[contains(@href,'start')]");
  1124. if(nextLink)
  1125. {
  1126. var href = nextLink.href;
  1127. this.startNumber = this._matchNum(href, /start=(\d+)/, 10);
  1128. this.itemsQuantity = this._matchNum(href, /num=(\d+)/, 10);
  1129. monkeyr.log('getAutoLoadParams', this.startNumber, this.itemsQuantity);
  1130. this.query = href;
  1131. this.resultStats = document.getElementById('resultStats');
  1132. return true;
  1133. }
  1134. else
  1135. {
  1136. monkeyr.log('no more results');
  1137. return false;
  1138. }
  1139. },
  1140.  
  1141. buildResultTable : function()
  1142. {
  1143. monkeyr.log('buildResultTable')
  1144. var tab = document.getElementById('GTR');
  1145. if(tab)
  1146. {
  1147. //monkeyr.log('del tab')
  1148. tab.parentNode.removeChild(tab);
  1149. }
  1150.  
  1151. var table = document.buildElement('table', {id:'GTR'});
  1152. // var table = document.buildElement('table', {id:'GTR',cellspacing:'5%',cellpadding:'0'});
  1153. this.resultsTable = table;
  1154. var div = document.getElementByXPath("//div/div[@class='g']/parent::div | //div[@id='res']/div | //div[@id='res']/span[@id='search']");
  1155. if(div)
  1156. {
  1157. // monkeyr.log('init this')
  1158. var start = window.location.search.match(/start=(\d+)/);
  1159. this.startBase = (start && start[1].retNum()) || 0;
  1160. this.lastI = 0;
  1161. this.startNumber = 0;
  1162. this.curRow = 0;
  1163. this.nextRow = 0;
  1164. this.requested = 0;
  1165. this.requestingMoreResults=false;
  1166. this.scrollHeight = 0;
  1167. // this.winInnerHeight = 0;
  1168.  
  1169. document.getElementById('ires').parentNode.appendChild(table);
  1170. //var list = document.getElementsByXPath("//div[@id='ires']//li[contains(@class,'g')] | //div[@id='ires']//li/div[@class='g']");
  1171. //var list = document.getElementsByXPath("//div[@id='ires']//li[contains(@class,'g')] | //div[@id='ires']//li/div[@class='g'] | //div[@id='ires']//div[@class='g']");
  1172. // var list = document.getElementsByXPath("//div[@id='ires']//li[contains(@class,'g')] | //div[@id='ires']//div[contains(@class,'obcontainer')] | //div[@id='ires']//li/div[@class='g'] | //div[@id='ires']//div[@class='g']");
  1173. // var list = document.getElementsByXPath("//div[@id='ires']//div[contains(@class,'kp-blk')] | //div[@id='ires']//li[contains(@class,'g')] | //div[@id='ires']//div[contains(@class,'obcontainer')] | //div[@id='ires']//li/div[@class='g'] | //div[@id='ires']//div[@class='g']");
  1174. var list = document.getElementsByXPath("//div[@id='ires']//g-section-with-header | //div[@id='ires']//div[contains(@class,'kp-blk')] | //div[@id='ires']//li[contains(@class,'g')] | //div[@id='ires']//div[contains(@class,'obcontainer')] | //div[@id='ires']//li/div[@class='g'] | //div[@id='ires']//div[@class='g']");
  1175. var length = list.length;
  1176. if((ires = document.getElementById('ires')) && (cnt = document.getElementById('cnt'))){
  1177. ires.style.display = ((length==1) ? 'block' : 'none');
  1178. cnt.className = ((length==1) ? cnt.className.replace(' singleton','') : cnt.className + ' singleton');
  1179. if(length==1) return false;
  1180. }
  1181. for (var i = 0; i < list.length; i++)
  1182. {
  1183. this.resultsToTable(list, i, length, true);
  1184. }
  1185. this.nextRow = this.curRow;
  1186. this.paginationBoundry();
  1187. this.lastI = i;
  1188. return true;
  1189. }
  1190. },
  1191.  
  1192. paginationBoundry : function()
  1193. {
  1194. if(this.newspaper && this.autoLoad)
  1195. {
  1196. var row = this.nextRow++;
  1197. this.resultsTable.insertRow(row);
  1198. var cell = this.resultsTable.rows[row].insertCell(0);
  1199. cell.setAttribute("valign", "top");
  1200. cell.setAttribute("width", "100%");
  1201. cell.setAttribute("colspan", this.numColumns);
  1202. var hr = document.createElement('hr');
  1203. cell.appendChild(hr);
  1204. }
  1205. },
  1206.  
  1207. resultsToTable : function(list, i, resLength, initial)
  1208. {
  1209. var link = list[i], div;
  1210. // monkeyr.log(link)
  1211. if(this.numResults && (div = document.getElementByXPath(".//div[@class='rc']/h3[@class='r'] | ./h3[@class='r'] | ./h3[1] | ./div[1]/h3[1] | .//td[@class='tsw']/h3[1]", link)))
  1212. {
  1213. var str = document.buildElement('strong', null, (i + this.lastI + this.startBase + 1) + ' - ' );
  1214. div.parentNode.insertBefore(str, div);
  1215. }
  1216. // if(this.noSitePreview){
  1217. // var divs = document.getElementsByXPath(".//div[contains(@class,'vsc')]", link)
  1218. // for (var j = 0; j < divs.length; j++)
  1219. // {
  1220. // divs[j].setAttribute('class', divs[j].getAttribute('class').replace('vsc',''));
  1221. // }
  1222. // }
  1223. var col=0, row=0;
  1224. if(this.newspaper)
  1225. {
  1226. var rowsPfetch = Math.ceil(resLength / this.numColumns);
  1227. col = Math.floor(i / rowsPfetch);
  1228. row = Math.floor(i - (col * rowsPfetch) + this.nextRow );
  1229. this.curRow = ((this.curRow <= row) && (row+1)) || this.curRow;
  1230. }
  1231. else
  1232. {
  1233. col = (i + this.lastI) % this.numColumns;
  1234. row = Math.floor((i + this.lastI) / this.numColumns);
  1235. }
  1236. if(col==0)
  1237. {
  1238. this.resultsTable.insertRow(row);
  1239. }
  1240. // var a = document.getElementByXPath(".//h3[contains(@class,'r')]/a[contains(@class, 'l')]", link);
  1241. var a = document.getElementByXPath(".//h3[contains(@class,'r')]/a", link);
  1242. if(a)
  1243. {
  1244. // monkeyr.log(a.href)
  1245. if(this.externalLinksResults)
  1246. {
  1247. a.target = "_blank";
  1248. }
  1249. else
  1250. {
  1251. a.target = "_self";
  1252. }
  1253.  
  1254. if(this.searchLinkTracking)
  1255. {
  1256. a.removeAttribute("onmousedown");
  1257. }
  1258.  
  1259. if(this.favIcon)
  1260. {
  1261. var base = a.href.match(/http[s]?:\/\/([\w\.\-]+)[:\/]/);
  1262. if(base){
  1263. var fav = document.buildElement('img', {width:'16',height:'16',style:'margin-bottom:-3px;', src:window.location.protocol+'//www.google.com/s2/favicons?domain=' + encodeURIComponent(base[1])});
  1264. a.parentNode.insertBefore(fav, a);
  1265. a.parentNode.insertBefore(document.createTextNode(' '), a);
  1266. }
  1267. }
  1268.  
  1269. if(this.imagePreview)
  1270. {
  1271. // monkeyr.log(this.imagePreview)
  1272. var a2 = a.cloneNode(false);
  1273. a2.removeAttribute('class');
  1274. var sl = a.href.match(/:\/\/www.(\w)|:\/\/(\w)/);
  1275. var bs = a.href.match(/(http:\/\/[\w\.\-:]+)\/|(ftp:\/\/[\w\.\-:]+)\/|(https:\/\/[\w\.\-:]+)\//);
  1276. sl = sl[1] || sl[2];
  1277. bs = bs[1] || bs[2] || bs[3];
  1278. var img = document.buildElement('img', {align:'left',src:window.location.protocol+"//"+ sl +".searchpreview.de/preview?s="+ bs +"&ra=1",
  1279. style:'border:1px solid #BBB;margin:2px 4px 5px 0px;width:111px;height:82px;'});
  1280. a2.appendChild(img);
  1281. a.parentNode.parentNode.insertBefore(a2, a.parentNode);
  1282. }
  1283. // var ele = document.getElementByXPath(".//div[@class='s']//span[@class='vshid']", link);
  1284. // var ele = document.getElementByXPath(".//div[@class='s']//div[@class='action-menu ab_ctl']", link);
  1285. var ele = document.getElementByXPath(".//div[@class='f kv']/cite/parent::div", link);
  1286.  
  1287. if(!this.searchLinkTracking && ele)
  1288. {
  1289. var notrack = document.buildElement('a',
  1290. {href:a.href,'class':'fl',title:'Visit the link without Google tracking you'},'Trackless');
  1291. if(this.externalLinksResults)
  1292. {
  1293. notrack.target = "_blank";
  1294. }
  1295. else
  1296. {
  1297. notrack.target = "_self";
  1298. }
  1299. // ele.appendChild(document.createTextNode(" "), ele.nextSibling);
  1300. ele.appendChild(notrack, ele.nextSibling);
  1301. }
  1302. }
  1303. var sublinks = link.querySelectorAll('tr.mslg > a, span a.l');
  1304. for(var m=0;m<sublinks.length;m++){
  1305. var sublink=sublinks[m];
  1306. if(this.searchLinkTracking)
  1307. {
  1308. sublink.removeAttribute("onmousedown");
  1309. if(this.externalLinksResults)
  1310. {
  1311. sublink.target = "_blank";
  1312. }
  1313. else
  1314. {
  1315. sublink.target = "_self";
  1316. }
  1317. }
  1318. else
  1319. {
  1320. var notrack = document.buildElement('a',
  1321. {href:sublink.href,'style':'font-size:x-small',title:'Visit the link without Google tracking you'},'Trackless');
  1322. if(this.externalLinksResults)
  1323. {
  1324. notrack.target = "_blank";
  1325. }
  1326. else
  1327. {
  1328. notrack.target = "_self";
  1329. }
  1330. sublink.parentNode.appendChild(document.createTextNode(" - "), sublink.parentNode.nextSibling);
  1331. sublink.parentNode.appendChild(notrack, sublink.parentNode.nextSibling);
  1332. }
  1333.  
  1334. }
  1335. var cell = this.resultsTable.rows[row].insertCell(col);
  1336. cell.setAttribute("valign", "top");
  1337. if(!initial)cell.setAttribute("class", "dyna");
  1338. var cellWidth = Math.floor(100 / this.numColumns) + "%";
  1339. cell.setAttribute("width", cellWidth);
  1340. //cell.setAttribute("id", i);
  1341. cell.appendChild(link);
  1342. },
  1343.  
  1344. processResults : function(responseText)
  1345. {
  1346. // monkeyr.log('processResults')
  1347. var i, img;
  1348. //this.loadingImage.style.display = "none";
  1349. var nextResult = document.buildElement('div', null, responseText);
  1350.  
  1351. // var imgs = document.getElementsByXPath(".//img[contains(@class,@id)]");
  1352. // for (i = 0; (img = imgs[i++]);)
  1353. // {
  1354. // img.removeAttribute('id')
  1355. // }
  1356.  
  1357. var stats = document.getElementByXPath(".//div[@id='resultStats']", nextResult);
  1358. if(this.resultStats && stats)
  1359. {
  1360. this.resultStats.innerHTML = stats.innerHTML;
  1361. }
  1362.  
  1363. //var list = document.getElementsByXPath(".//div[@id='res']/div//li[starts-with(@class,'g')]/ | .//div[@id='res']/div//li/div[@class='g']", nextResult);
  1364. //var list = document.getElementsByXPath(".//div[@id='ires']/ol/div[starts-with(@class,'srg')]/li | //div[@id='ires']//div[@class='g'] | //div[@id='ires']//li[contains(@class,'g')]", nextResult);
  1365. var list = document.getElementsByXPath(".//div[@id='ires']/ol/div[starts-with(@class,'srg')]/li | //div[@id='ires']//div[contains(@class,'obcontainer')] | //div[@id='ires']//div[@class='g'] | //div[@id='ires']//li[contains(@class,'g')]", nextResult);
  1366. var length = list.length;
  1367. if((ires = document.getElementById('ires')) && (cnt = document.getElementById('cnt'))){
  1368. ires.style.display = ((length==1) ? 'block' : 'none');
  1369. cnt.className = ((length==1) ? cnt.className.replace(' g','') : cnt.className + ' g');
  1370. if(length==1) return false;
  1371. }
  1372.  
  1373. for (i = 0; i < list.length; i++)
  1374. {
  1375. this.resultsToTable(list, i, length, false);
  1376. }
  1377. this.nextRow = this.curRow;
  1378. this.paginationBoundry();
  1379. this.lastI += i;
  1380. var isNextExist = document.getElementByXPath(".//table[@id='nav']//td[last()]/a[@href]", nextResult);
  1381. if (isNextExist)
  1382. {
  1383. this.startNumber += this.itemsQuantity;
  1384. }
  1385. else
  1386. {
  1387. // this.endText.style.display = 'block';
  1388. }
  1389. this.requestingMoreResults=false;
  1390. // monkeyr.log('process results whackImages')
  1391. this.whackImages(nextResult);
  1392. },
  1393.  
  1394. whackImages : function(whackie){
  1395. clearTimeout(this.whackImagesTimeOut);
  1396. this.whackImagesTimeOut = setTimeout(function()
  1397. {
  1398. if(this.requestingMoreResults) return;
  1399. monkeyr.log('!!!!! Whacking Img !!!!!')
  1400. // fix for thumnail display from google image search on 2nd or greater autoloaded pages
  1401. var xfoot = document.getElementByXPath(".//div[@id='xfoot']", whackie);
  1402. var scrxpath = (xfoot) ? ".//div[@id='xfoot']/script" : "./script"; //results returned in Opera have no xfoot div. Weird!)
  1403. var imgscrs = document.getElementsByXPath(scrxpath, whackie);
  1404. // monkeyr.log(scrxpath +', '+imgscrs.length)
  1405. if (imgscrs && imgscrs.length>1)
  1406. {
  1407. for (i = 0; i<(imgscrs.length-1); i++)
  1408. {
  1409. var scr = imgscrs[i] && imgscrs[i].innerHTML;
  1410. if(scr.indexOf('data:image/')!=-1)
  1411. {
  1412. // monkeyr.log(scr);
  1413. eval(scr);
  1414. }
  1415. }
  1416. }
  1417. // monkeyr.log(whackie.nodeName)
  1418. // fix for thumnail zoom from google image search on 2nd or greater autoloaded pages
  1419. var xjsi = whackie.querySelector('#xjsi script');
  1420. if(xjsi){
  1421. // monkeyr.log(xjsi.innerHTML);
  1422. // commented out as it seems to fix the zoom on autoloaded results but breaks the "more" link
  1423. // this.exec(xjsi.innerHTML);
  1424. }
  1425. // fix for auto load thumnails being overwritten
  1426. var imgs = document.querySelectorAll('td.dyna div.th img[id]');
  1427. for(var m=0;m<imgs.length;m++){
  1428. // monkeyr.log('removeid', imgs[m].id);
  1429. imgs[m].removeAttribute('id');
  1430. }
  1431. // Fix for image mouseover error
  1432. var imgs = document.querySelectorAll('img.rg_hi:not([id])');
  1433. for(var m=0;m<imgs.length;m++){
  1434. // monkeyr.log('mouseover',imgs[m]);
  1435. imgs[m].id='rg_hi';
  1436. }
  1437. }.bind(this),0);
  1438. },
  1439.  
  1440. exec : function(fn) {
  1441. var script = document.buildElement('script', {'type':'application/javascript'});
  1442. script.textContent = '(function(){' + fn + '})();';
  1443. document.body.appendChild(script); // run the script
  1444. document.body.removeChild(script); // clean up
  1445. },
  1446.  
  1447. externalLinks : function(scope, blank)
  1448. {
  1449. var thisdomain = window.location.host;
  1450. var links = scope.getElementsByTagName('a');
  1451. for (var i = 0; i < links.length; i++) {
  1452. var a = links[i];
  1453. if (a.href && a.host && a.host != thisdomain) {
  1454. a.target = (blank ? "_blank" : "_self");
  1455. }
  1456. }
  1457. },
  1458.  
  1459. registerControls : function()
  1460. {
  1461. monkeyr.log('registerControls');
  1462. // var controls = document.getElementByXPath("//div[@id='ab_options']/ul/li[3]");
  1463. var controls = document.getElementByXPath("//g-header-menu[@id='ab_options']");
  1464. // var webhpcontrols = document.getElementByXPath("//div[@class='gbmc']/ol/li[3]");
  1465. var liclass = (controls) ? 'ab_dropdownitem' : 'gbe gbmtc';
  1466. var linkclass = (controls) ? 'hdtb-tl' : 'gbmt';
  1467. // controls = controls || webhpcontrols;
  1468. controls = controls;
  1469. var link = document.getElementById('GoogleMonkeyRLink');
  1470. if (controls && !link)
  1471. {
  1472. monkeyr.log('registerControls Registered');
  1473. // var parent = document.getElementById('abar_button_opt');
  1474. // var parent = document.getElementByXPath("//a[@id='hdtb-tls']");
  1475. // var parent = controls.parentNode;
  1476. var gheadermenu = document.getElementById('ab_options');
  1477. // var li = document.buildElement('li',{'class':liclass});
  1478. link = document.buildElement('a',{href:'#',id:'GoogleMonkeyRLink','class':linkclass},'GoogleMonkeyR settings','click',UIL.UI.preferencesShow.bind(UIL.UI));
  1479. // li.appendChild(link);
  1480. // parent.insertBefore(link, controls);
  1481. gheadermenu.appendChild(link);
  1482. }
  1483. if(typeof GM_registerMenuCommand !== "undefined"){
  1484. GM_registerMenuCommand("GoogleMonkeyR Preferences", UIL.UI.preferencesShow.bind(UIL.UI));
  1485. }
  1486. },
  1487.  
  1488. addStyle : function(css)
  1489. {
  1490. if (typeof GM_addStyle != "undefined") {
  1491. GM_addStyle(css);
  1492. } else {
  1493. var heads = document.getElementsByTagName("head");
  1494. if (heads.length > 0) {
  1495. var node = document.createElement("style");
  1496. node.type = "text/css";
  1497. node.innerHTML = css;
  1498. heads[0].appendChild(node);
  1499. }
  1500. }
  1501. },
  1502.  
  1503. _matchNum : function (subject, test, def)
  1504. {
  1505. var out = subject.match(test);
  1506. return (out ? +(out[1]) : (def || 0));
  1507. }
  1508.  
  1509. };
  1510.  
  1511. /**
  1512. * Configuration.
  1513. **/
  1514. UIL.Config =
  1515. {
  1516. getBGBorder : function()
  1517. {
  1518. return this._getBooleanConfig("BGBorder", "background");
  1519. },
  1520.  
  1521. setBGBorder : function(BGBorder)
  1522. {
  1523. GM_setValue("BGBorder", BGBorder);
  1524. },
  1525.  
  1526. getResHue : function()
  1527. {
  1528. return this._getBooleanConfig("resHue", "#FAFAE6");
  1529. },
  1530.  
  1531. setResHue : function(resHue)
  1532. {
  1533. resHue = resHue.toUpperCase();
  1534. if(!resHue.match(/^#[0-9A-F]{6}$/))
  1535. {
  1536. resHue = "";
  1537. }
  1538. GM_setValue("resHue", resHue);
  1539. },
  1540.  
  1541. getNumCol : function()
  1542. {
  1543. return this._getBooleanConfig("numCol", 1);
  1544. },
  1545.  
  1546. setNumCol : function(numCol)
  1547. {
  1548. GM_setValue("numCol", numCol);
  1549. },
  1550.  
  1551. getRemSponsor : function()
  1552. {
  1553. return this._getBooleanConfig("remSponsor", false);
  1554. },
  1555.  
  1556. setRemSponsor : function(remSponsor)
  1557. {
  1558. GM_setValue("remSponsor", remSponsor);
  1559. },
  1560.  
  1561. getRemRightPanel : function()
  1562. {
  1563. return this._getBooleanConfig("remRightPanel", false);
  1564. },
  1565.  
  1566. setRemRightPanel : function(remRightPanel)
  1567. {
  1568. GM_setValue("remRightPanel", remRightPanel);
  1569. },
  1570.  
  1571. getNumResults : function()
  1572. {
  1573. return this._getBooleanConfig("numResults", false);
  1574. },
  1575.  
  1576. setNumResults : function(numResults)
  1577. {
  1578. GM_setValue("numResults", numResults);
  1579. },
  1580.  
  1581. getAutoLoad : function()
  1582. {
  1583. return this._getBooleanConfig("autoLoad", false);
  1584. },
  1585.  
  1586. setAutoLoad : function(autoLoad)
  1587. {
  1588. GM_setValue("autoLoad", autoLoad);
  1589. },
  1590.  
  1591.  
  1592. getHideSearch : function()
  1593. {
  1594. return this._getBooleanConfig("hideSearch", false);
  1595. },
  1596.  
  1597. setHideSearch : function(hideSearch)
  1598. {
  1599. GM_setValue("hideSearch", hideSearch);
  1600. },
  1601.  
  1602. getExtLinkSearch : function()
  1603. {
  1604. return this._getBooleanConfig("extLinkSearch", false);
  1605. },
  1606.  
  1607. setExtLinkSearch : function(extLinkSearch)
  1608. {
  1609. GM_setValue("extLinkSearch", extLinkSearch);
  1610. },
  1611.  
  1612. getExtLinkiGoogle : function()
  1613. {
  1614. return this._getBooleanConfig("extLinkiGoogle", false);
  1615. },
  1616.  
  1617. setExtLinkiGoogle : function(extLinkiGoogle)
  1618. {
  1619. GM_setValue("extLinkiGoogle", extLinkiGoogle);
  1620. },
  1621.  
  1622. getSearchLinkTracking : function()
  1623. {
  1624. return this._getBooleanConfig("searchLinkTracking", false);
  1625. },
  1626.  
  1627. setSearchLinkTracking : function(searchLinkTracking)
  1628. {
  1629. GM_setValue("searchLinkTracking", searchLinkTracking);
  1630. },
  1631.  
  1632. getImagePreview : function()
  1633. {
  1634. return this._getBooleanConfig("imagePreview", false);
  1635. },
  1636.  
  1637. setImagePreview : function(imagePreview)
  1638. {
  1639. GM_setValue("imagePreview", imagePreview);
  1640. },
  1641.  
  1642. getFavIcon : function()
  1643. {
  1644. return this._getBooleanConfig("favIcon", false);
  1645. },
  1646.  
  1647. setFavIcon : function(favIcon)
  1648. {
  1649. GM_setValue("favIcon", favIcon);
  1650. },
  1651.  
  1652. getSearchesRelatedTo : function()
  1653. {
  1654. return this._getBooleanConfig("hideSearchesRelatedTo", false);
  1655. },
  1656.  
  1657. setSearchesRelatedTo : function(hideSearchesRelatedTo)
  1658. {
  1659. GM_setValue("hideSearchesRelatedTo", hideSearchesRelatedTo);
  1660. },
  1661.  
  1662. getResultFlow : function()
  1663. {
  1664. return this._getBooleanConfig("resultFlow", "l2r");
  1665. },
  1666.  
  1667. setResultFlow : function(resultFlow)
  1668. {
  1669. GM_setValue("resultFlow", resultFlow);
  1670. },
  1671.  
  1672. getNoSitePreview : function()
  1673. {
  1674. return this._getBooleanConfig("noSitePreview", false);
  1675. },
  1676.  
  1677. setNoSitePreview : function(noSitePreview)
  1678. {
  1679. GM_setValue("noSitePreview", noSitePreview);
  1680. },
  1681.  
  1682. _getBooleanConfig : function(configName, defaultValue)
  1683. {
  1684. var config = GM_getValue(configName);
  1685. if (config === undefined)
  1686. {
  1687. GM_setValue(configName, defaultValue);
  1688. config = defaultValue;
  1689. }
  1690. return config;
  1691. }
  1692. };
  1693.  
  1694. /**
  1695. * Preferences User Interface (UI).
  1696. **/
  1697. UIL.UI =
  1698. {
  1699. preferencesShow : function(e)
  1700. {
  1701. if (e)
  1702. {
  1703. e.preventDefault();
  1704. e.stopPropagation();
  1705. }
  1706.  
  1707. this._loadBlocker();
  1708. var prefs = document.buildElement('div',
  1709. {id:'uil_preferences',name:'uil_preferences',
  1710. style:'position:fixed;top:5%;left:0px;right:0px;border:none;height:100%;width:100%;overflow:hidden;z-index:10001;'}
  1711. ,this.Base64.decode(UIL.RES.PREFS_HTML));
  1712. document.body.appendChild(prefs);
  1713. this.preferencesDocumentLoadHandler();
  1714. this.prefs = prefs;
  1715. },
  1716.  
  1717. _loadBlocker : function()
  1718. {
  1719. if (this.blocker==null)
  1720. {
  1721. var blocker = document.buildElement('div',
  1722. {id:'uil_blocker',
  1723. style:'position:fixed;top:0px;left:0px;right:0px;bottom:0px;background-color:#000;opacity:0.5;z-index:10000;'});
  1724.  
  1725. this.blocker = blocker;
  1726. document.body.appendChild(blocker);
  1727. }
  1728. },
  1729.  
  1730. updateScript : function(e)
  1731. {
  1732. if (e)
  1733. {
  1734. e.preventDefault();
  1735. e.stopPropagation();
  1736. }
  1737.  
  1738. this._loadBlocker();
  1739.  
  1740. try{
  1741. window.location.replace("http://userscripts.org/scripts/source/"+ UIL.scriptId +".user.js");
  1742. }
  1743. catch(e)
  1744. {}
  1745. if(this.prefs)document.body.removeChild(this.prefs);
  1746. if(this.history)document.body.removeChild(this.history);
  1747. GM_setValue('skipVersion', 0);
  1748. setTimeout(this.refreshShow.bind(this),4000);
  1749.  
  1750. },
  1751.  
  1752. refreshShow : function()
  1753. {
  1754. var refresh = document.buildElement('iframe',
  1755. {style:'position:fixed;top:20%;left:0px;right:0px;border:none;height:100%;width:100%;overflow:hidden;z-index:10001;',
  1756. src:UIL.RES.REFRESH_HTML},'','load',this.refreshDocumentLoadHandler.bind(this));
  1757.  
  1758. this.refresh = refresh;
  1759. document.body.appendChild(refresh);
  1760. },
  1761.  
  1762. refreshDocumentLoadHandler : function()
  1763. {
  1764. this.refresh.contentDocument.getElementById("scriptName").innerHTML=UIL.scriptName;
  1765. },
  1766.  
  1767. hide : function()
  1768. {
  1769. if(this.history) document.body.removeChild(this.history);
  1770. if(this.prefs)document.body.removeChild(this.prefs);
  1771. if(this.blocker)document.body.removeChild(this.blocker);
  1772. this.history = null;
  1773. this.prefs = null;
  1774. this.blocker = null;
  1775. },
  1776.  
  1777. preferencesDocumentLoadHandler : function()
  1778. {
  1779. var form = document.getElementById("preferences");
  1780.  
  1781. // Set up form state
  1782. form.elements.namedItem("numcol" + UIL.Config.getNumCol()).checked = true;
  1783. form.elements.namedItem("remsponsor").checked = UIL.Config.getRemSponsor();
  1784. form.elements.namedItem("numresults").checked = UIL.Config.getNumResults();
  1785. form.elements.namedItem("remrightpanel").checked = UIL.Config.getRemRightPanel();
  1786. form.elements.namedItem("autoload").checked = UIL.Config.getAutoLoad();
  1787. form.elements.namedItem("hidesearch").checked = UIL.Config.getHideSearch();
  1788. form.elements.namedItem("noSitePreview").checked = UIL.Config.getNoSitePreview();
  1789. form.elements.namedItem("extlinksearch").checked = UIL.Config.getExtLinkSearch();
  1790. form.elements.namedItem("extlinkigoogle").checked = UIL.Config.getExtLinkiGoogle();
  1791. form.elements.namedItem("searchlinktracking").checked = UIL.Config.getSearchLinkTracking();
  1792. form.elements.namedItem("ResHuefield").value = UIL.Config.getResHue();
  1793. form.elements.namedItem("imagepreview").checked = UIL.Config.getImagePreview();
  1794. form.elements.namedItem("favicon").checked = UIL.Config.getFavIcon();
  1795. form.elements.namedItem("remsearchesrelatedto").checked = UIL.Config.getSearchesRelatedTo();
  1796. //this.prefs.contentDocument.getElementById("ResHue").style.color = UIL.Config.getResHue();
  1797. document.getElementById("ResHue").style.background = UIL.Config.getResHue();
  1798. document.getElementById("BGBorderlink").innerHTML = UIL.Config.getBGBorder();
  1799. document.getElementById("flowimg").className = UIL.Config.getResultFlow();
  1800.  
  1801. // Set up event handlers
  1802. form.elements.namedItem("close_button").addEventListener("click", this.hide.bind(this), false);
  1803. form.elements.namedItem("save_button").addEventListener("click", this.preferencesSaveConfigurationHandler.bind(this), false);
  1804. document.getElementById("ResHue").addEventListener("click", UIL.RES.colorPicker.pickColor.bind(UIL.RES.colorPicker), false);
  1805. document.getElementById("flowimg").addEventListener("click", UIL.RES.flowtog, false);
  1806. document.getElementById("BGBorderlink").addEventListener("click", UIL.RES.bgBordertog, false);
  1807. document.getElementById("ResHuefield").addEventListener("change", UIL.RES.colorPicker.relateColor('ResHue'), false);
  1808.  
  1809. document.getElementById("version").innerHTML=UIL.scriptVersion;
  1810. if(BrowserDetect.csQuery){
  1811. this.getURL("http://userscripts.org/scripts/source/"+UIL.scriptId+".meta.js", this.updateTestOnPreferences.bind(this));
  1812. }
  1813. else{
  1814. this.updateLink(false);
  1815. }
  1816. },
  1817.  
  1818. getURL : function(address, cb)
  1819. {
  1820. GM_xmlhttpRequest({
  1821. method :"GET",
  1822. url :address,//+"?"+Math.random(),
  1823. onload :function(xhr) {cb(xhr.responseText);}
  1824. });
  1825. },
  1826.  
  1827. updateCheckRequest : function()
  1828. {
  1829. if(!BrowserDetect.csQuery) return;
  1830. var lastCheck = GM_getValue('lastCheck', 0);
  1831. if (this._currentTime() > (lastCheck + 86400)) //24 hours after last check
  1832. {
  1833. GM_setValue('delayUpdate', false);
  1834. this.getURL("http://userscripts.org/scripts/source/"+UIL.scriptId+".meta.js", this.updateTestOnPage.bind(this));
  1835. }
  1836. else
  1837. {
  1838. this.onSiteVersion = GM_getValue('onSiteVersion', 0);
  1839. var delayUpdate = GM_getValue('delayUpdate', false);
  1840. var skipVersion = GM_getValue('skipVersion', 0);
  1841. if ( this.versionCompare(UIL.scriptVersion, this.onSiteVersion) )
  1842. {
  1843. if ( this.versionCompare(skipVersion, this.onSiteVersion) && !delayUpdate )
  1844. {
  1845. this.updateMessageShow();
  1846. }
  1847. }
  1848. }
  1849. },
  1850.  
  1851. updateTestOnPage : function(text)
  1852. {
  1853. var skipVersion = GM_getValue('skipVersion', 0);
  1854.  
  1855. var onSiteVersion = text.match(/\/\/\s*@version\s*(\d.*)/);
  1856. this.onSiteVersion = (onSiteVersion===null) ? 0 : onSiteVersion[1];
  1857. GM_setValue('onSiteVersion', this.onSiteVersion);
  1858.  
  1859. var updateHistory = text.substring(text.search(/\/\*.*StartHistory/im));
  1860. updateHistory = updateHistory.substring(0, updateHistory.search(/EndHistory.*\*\//im))
  1861. GM_setValue('onSiteVersionHistory', encodeURI(updateHistory));
  1862.  
  1863. if ( this.versionCompare(UIL.scriptVersion, this.onSiteVersion) )
  1864. {
  1865. if ( this.versionCompare(skipVersion, this.onSiteVersion) )
  1866. {
  1867. this.updateMessageShow();
  1868. }
  1869. }
  1870. GM_setValue('lastCheck', this._currentTime());
  1871. },
  1872.  
  1873. updateLink : function(update){
  1874. var link = document.getElementById("check_update");
  1875. link.setAttribute("target", "_top");
  1876.  
  1877. if ( update )
  1878. {
  1879. link.addEventListener("click", this.historyShow.bind(this), false);
  1880. link.setAttribute("title", " see what's new with GoogleMonkeyR... ");
  1881. link.style.textDecoration = "blink";
  1882. link.innerHTML = "v"+this.onSiteVersion+" available";
  1883. }
  1884. else
  1885. {
  1886. if(BrowserDetect.csQuery)
  1887. {
  1888. link.setAttribute("href", "#");
  1889. link.setAttribute("title", " the history of GoogleMonkeyR ");
  1890. link.innerHTML = "history";
  1891. link.addEventListener("click", this.historyShow.bind(this), false);
  1892. }
  1893. else
  1894. {
  1895. link.setAttribute("href", "http://userscripts.org/scripts/show/"+UIL.scriptId);
  1896. link.setAttribute("title", " check for the latest script version on the homepage ");
  1897. link.innerHTML = "script homepage";
  1898. }
  1899. link.parentNode.appendChild(document.createTextNode(" - "));
  1900.  
  1901. var link2 = document.buildElement('a',{href:"http://"+ location.hostname +"/preferences",
  1902. target:'_parent',title:' your Google preferences '},'prefs');
  1903.  
  1904. link.parentNode.appendChild(link2);
  1905. link.parentNode.appendChild(document.createTextNode(" - "));
  1906.  
  1907. var link3 = document.buildElement('a',{href:"https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mungushume@hotmail.com&item_name=GreaseMonkey%20programming/beer%20fund&no_shipping=0&no_note=1&tax=0&currency_code=GBP&lc=GB&bn=PP-DonationsBF&charset=UTF-8",
  1908. target:'_parent',title:' donate to the GoogleMonkeyR programming/beer fund '},'donate');
  1909.  
  1910. link.parentNode.appendChild(link3);
  1911. }
  1912. },
  1913.  
  1914. updateTestOnPreferences: function(text)
  1915. {
  1916. var onSiteVersion = text.match(/\/\/\s*@version\s*(\d.*)/);
  1917. this.onSiteVersion = (onSiteVersion===null) ? 0 : onSiteVersion[1];
  1918. GM_setValue('onSiteVersion', this.onSiteVersion);
  1919.  
  1920. var updateHistory = text.substring(text.search(/\/\*/));
  1921. updateHistory = updateHistory.substring(0, updateHistory.search(/\*\//))
  1922. GM_setValue('onSiteVersionHistory', encodeURI(updateHistory));
  1923.  
  1924. this.updateLink(this.versionCompare(UIL.scriptVersion, this.onSiteVersion));
  1925.  
  1926. GM_setValue('lastCheck', this._currentTime());
  1927. },
  1928.  
  1929. versionCompare : function(ver1, ver2)
  1930. {
  1931. var maxVersionPartTest = 5;
  1932. var ver1Arr = (ver1+('.0'.repeat(maxVersionPartTest))).split(".",maxVersionPartTest);
  1933. var ver2Arr = (ver2+('.0'.repeat(maxVersionPartTest))).split(".",maxVersionPartTest);
  1934.  
  1935. //alert(ver1Arr.join(',') + ' - ' +ver2Arr.join(','));
  1936.  
  1937. for(var i=0; i<maxVersionPartTest; i++)
  1938. {
  1939. //alert(ver1Arr[i].retNum() +' '+ ver2Arr[i].retNum());
  1940. if( ver1Arr[i].retNum() < ver2Arr[i].retNum() )
  1941. {
  1942. break;
  1943. }
  1944. else if( ver1Arr[i].retNum() > ver2Arr[i].retNum() )
  1945. {
  1946. i = maxVersionPartTest
  1947. break;
  1948. }
  1949. }
  1950. return (i<maxVersionPartTest);
  1951. },
  1952.  
  1953. updateMessageShow : function()
  1954. {
  1955. UIL.addStyle("@namespace url(http://www.w3.org/1999/xhtml); .gbh{display: none !important;} #gm_update_alert {margin: 10px; background-color: #E5ECF9; text-align: center; -moz-border-radius: 5px; position: relative; z-index: 2000; border: 1px solid; } #gm_update_alert a:visited {color: #0000CC !important} #gm_update_alert p {padding: 5px}");
  1956. var div = document.buildElement("div",{id:'gm_update_alert'});
  1957. var p = document.createElement("p");
  1958. var sn = document.buildElement("strong",{},UIL.scriptName+"&nbsp;");
  1959. var sep = document.buildElement("span",{},"&nbsp;&nbsp;-&nbsp;&nbsp;");
  1960. p.appendChild(sn);
  1961. p.appendChild(document.createTextNode(" update available v"+this.onSiteVersion+" (current v"+UIL.scriptVersion+")"));
  1962. p.appendChild(sep.cloneNode(true));
  1963. p.appendChild(document.buildElement('a',{href:'#'},"Ignore for 24 hours",'click',UIL.UI.updateDelay.bind(UIL.UI)));
  1964. p.appendChild(sep.cloneNode(true));
  1965. p.appendChild(document.buildElement('a',{href:'#'},"Wait for next version",'click',UIL.UI.updateSkip.bind(UIL.UI)));
  1966. p.appendChild(sep.cloneNode(true));
  1967. var a = document.buildElement("a", {target:"_blank", href:"http://userscripts.org/scripts/show/"+UIL.scriptId}, "Script homepage");
  1968. p.appendChild(a);
  1969. p.appendChild(sep.cloneNode(true));
  1970. p.appendChild(document.buildElement('a',{href:'#'},"What's new",'click',UIL.UI.historyShow.bind(UIL.UI)));
  1971. p.appendChild(sep.cloneNode(true));
  1972. p.appendChild(document.buildElement('a',{href:'#'},"Update",'click',UIL.UI.updateScript.bind(UIL.UI)));
  1973. div.appendChild(p);
  1974. document.body.insertBefore(div, document.body.firstChild);
  1975. this.updateMessage = div
  1976. },
  1977.  
  1978. updateMessageHide : function()
  1979. {
  1980. if(this.updateMessage)document.body.removeChild(this.updateMessage);
  1981. this.updateMessage = null;
  1982. },
  1983.  
  1984. updateDelay : function(e)
  1985. {
  1986. if (e)
  1987. {
  1988. e.preventDefault();
  1989. e.stopPropagation();
  1990. }
  1991. GM_setValue('delayUpdate', true);
  1992. alert("You will not be reminded about this update again for 24 hours.");
  1993. this.updateMessageHide();
  1994. },
  1995.  
  1996. updateSkip : function(e)
  1997. {
  1998. if (e)
  1999. {
  2000. e.preventDefault();
  2001. e.stopPropagation();
  2002. }
  2003. GM_setValue('skipVersion', this.onSiteVersion);
  2004. alert("You will not be reminded again until the next new version is released.");
  2005. this.updateMessageHide();
  2006. },
  2007.  
  2008. _currentTime : function()
  2009. {
  2010. var d = new Date();
  2011. return Math.round(d.getTime() / 1000); // Unix time in seconds
  2012. },
  2013.  
  2014. historyShow : function(e)
  2015. {
  2016. if (e)
  2017. {
  2018. e.preventDefault();
  2019. e.stopPropagation();
  2020. }
  2021.  
  2022. this._loadBlocker();
  2023. if(this.prefs)document.body.removeChild(this.prefs);
  2024. this.prefs = null;
  2025.  
  2026. var history = document.buildElement("iframe", {src:UIL.RES.HISTORY_HTML,
  2027. style:"position:fixed;top:5%;left:0px;right:0px;border:none;height:100%;width:100%;overflow:hidden;z-index:10001"},
  2028. null, "load", this.historyDocumentLoadHandler.bind(this));
  2029. this.history = history;
  2030.  
  2031. document.body.appendChild(history);
  2032. },
  2033.  
  2034. historyDocumentLoadHandler : function()
  2035. {
  2036. this.history.contentDocument.getElementById("version").innerHTML=UIL.scriptVersion;
  2037. this.history.contentDocument.getElementById("scriptName").innerHTML=UIL.scriptName;
  2038.  
  2039. var form = this.history.contentDocument.forms.namedItem("history");
  2040.  
  2041. // Set up form state
  2042. form.elements.namedItem("history_text").innerHTML = decodeURI(GM_getValue('onSiteVersionHistory', ''));
  2043.  
  2044. // Set up event handlers
  2045. form.elements.namedItem("install_button").addEventListener("click", this.updateScript.bind(this), false);
  2046. form.elements.namedItem("close_button").addEventListener("click", this.hide.bind(this), false);
  2047.  
  2048. },
  2049.  
  2050. preferencesSaveConfigurationHandler : function()
  2051. {
  2052. var form = document.getElementById("preferences");
  2053. for(var i = 1; i <= 4; i++)
  2054. {
  2055. if(form.elements.namedItem("numcol" + i).checked)
  2056. {
  2057. UIL.Config.setNumCol(i);
  2058. break;
  2059. }
  2060. }
  2061. UIL.Config.setRemSponsor(form.elements.namedItem("remsponsor").checked);
  2062. UIL.Config.setNumResults(form.elements.namedItem("numresults").checked);
  2063. UIL.Config.setRemRightPanel(form.elements.namedItem("remrightpanel").checked);
  2064. UIL.Config.setAutoLoad(form.elements.namedItem("autoload").checked);
  2065. UIL.Config.setHideSearch(form.elements.namedItem("hidesearch").checked);
  2066. UIL.Config.setNoSitePreview(form.elements.namedItem("noSitePreview").checked);
  2067. UIL.Config.setExtLinkSearch(form.elements.namedItem("extlinksearch").checked);
  2068. UIL.Config.setExtLinkiGoogle(form.elements.namedItem("extlinkigoogle").checked);
  2069. UIL.Config.setSearchLinkTracking(form.elements.namedItem("searchlinktracking").checked);
  2070. UIL.Config.setResHue(form.elements.namedItem("ResHuefield").value);
  2071. UIL.Config.setBGBorder(document.getElementById("BGBorderlink").innerHTML);
  2072. UIL.Config.setImagePreview(form.elements.namedItem("imagepreview").checked);
  2073. UIL.Config.setFavIcon(form.elements.namedItem("favicon").checked);
  2074. UIL.Config.setSearchesRelatedTo(form.elements.namedItem("remsearchesrelatedto").checked);
  2075. UIL.Config.setResultFlow(document.getElementById("flowimg").className);
  2076. this.hide();
  2077. window.location.reload(true);
  2078. },
  2079. /**
  2080. *
  2081. * Base64 encode / decode
  2082. * http://www.webtoolkit.info/
  2083. *
  2084. **/
  2085. Base64 : {
  2086.  
  2087. // private property
  2088. _keyStr :
  2089. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
  2090.  
  2091. // public method for encoding
  2092. encode : function (input, isBinaryData) {
  2093. var output = [];
  2094. var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
  2095. var i = 0;
  2096.  
  2097. input = isBinaryData ? String.fromCharCode.apply(null, input) :
  2098. this._utf8_encode(input);
  2099.  
  2100. var len = input.length;
  2101. while (i < len) {
  2102. chr1 = input.charCodeAt(i++);
  2103. chr2 = input.charCodeAt(i++);
  2104. chr3 = input.charCodeAt(i++);
  2105. enc1 = chr1 >> 2;
  2106. enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
  2107. enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
  2108. enc4 = chr3 & 63;
  2109. if (isNaN(chr2)) {
  2110. enc3 = enc4 = 64;
  2111. } else if (isNaN(chr3)) {
  2112. enc4 = 64;
  2113. }
  2114. output.push(
  2115. this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
  2116. this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4));
  2117. }
  2118.  
  2119. return output.join("");
  2120. },
  2121.  
  2122. // public method for decoding
  2123. decode : function (input) {
  2124. if(!input)
  2125. return "";
  2126. var output = [];
  2127. var chr1, chr2, chr3;
  2128. var enc1, enc2, enc3, enc4;
  2129. var i = 0;
  2130.  
  2131. input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
  2132.  
  2133. var len = input.length;
  2134. while (i < len) {
  2135. enc1 = this._keyStr.indexOf(input.charAt(i++));
  2136. enc2 = this._keyStr.indexOf(input.charAt(i++));
  2137. enc3 = this._keyStr.indexOf(input.charAt(i++));
  2138. enc4 = this._keyStr.indexOf(input.charAt(i++));
  2139. chr1 = (enc1 << 2) | (enc2 >> 4);
  2140. chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
  2141. chr3 = ((enc3 & 3) << 6) | enc4;
  2142. output.push( String.fromCharCode(chr1));
  2143. if (enc3 != 64) {
  2144. output.push(String.fromCharCode(chr2));
  2145. }
  2146. if (enc4 != 64) {
  2147. output.push( String.fromCharCode(chr3));
  2148. }
  2149. }
  2150.  
  2151. return this._utf8_decode(output.join(""));
  2152. },
  2153.  
  2154. // private method for UTF-8 encoding
  2155. _utf8_encode : function (string) {
  2156. string = string.replace(/\r\n/g,"\n");
  2157. var utftext = [];
  2158. var len = string.length;
  2159.  
  2160. for (var n = 0; n < len; n++) {
  2161.  
  2162. var c = string.charCodeAt(n);
  2163.  
  2164. if (c < 128) {
  2165. utftext.push( String.fromCharCode(c));
  2166. }
  2167. else if((c > 127) & (c < 2048)) {
  2168. utftext.push(String.fromCharCode((c >> 6) | 192),
  2169. String.fromCharCode((c & 63) | 128));
  2170. }
  2171. else {
  2172. utftext.push( String.fromCharCode((c >> 12) | 224),
  2173. String.fromCharCode(((c >> 6) & 63) | 128),
  2174. String.fromCharCode((c & 63) | 128));
  2175. }
  2176.  
  2177. }
  2178.  
  2179. return utftext.join("");
  2180. },
  2181.  
  2182. // private method for UTF-8 decoding
  2183. _utf8_decode : function (utftext) {
  2184. var string = [];
  2185. var i = 0;
  2186. var c = c1 = c2 = 0;
  2187. var len = utftext.length;
  2188.  
  2189. while ( i < len ) {
  2190.  
  2191. c = utftext.charCodeAt(i);
  2192.  
  2193. if (c < 128) {
  2194. string.push(String.fromCharCode(c));
  2195. i++;
  2196. }
  2197. else if((c > 191) & (c < 224)) {
  2198. c2 = utftext.charCodeAt(i+1);
  2199. string.push(String.fromCharCode(((c & 31) << 6) | (c2 & 63)));
  2200. i += 2;
  2201. }
  2202. else {
  2203. c2 = utftext.charCodeAt(i+1);
  2204. c3 = utftext.charCodeAt(i+2);
  2205. string.push( String.fromCharCode(((c & 15) << 12) |
  2206. ((c2 & 63) << 6) | (c3 & 63)));
  2207. i += 3;
  2208. }
  2209.  
  2210. }
  2211.  
  2212. return string.join("");
  2213. }
  2214. }
  2215.  
  2216. };
  2217.  
  2218. /**
  2219. * Resource section (RES).
  2220. **/
  2221. UIL.RES =
  2222. {
  2223. PREFS_HTML : "PHN0eWxlIHR5cGU9InRleHQvY3NzIj4NCi5ib2R5IHsNCgltYXJnaW46MDsNCglwYWRkaW5nOjA7DQoJZm9udC1zaXplOjEycHg7DQoJZm9udC1mYW1pbHk6Ikx1Y2lkYSBHcmFuZGUiLCAiQml0c3RyZWFtIFZlcmEgU2FucyIsIFZlcmRhbmEsIEFyaWFsLCBzYW5zLXNlcmlmOw0KCWNvbG9yOiMzMzM7DQoJd2lkdGg6IDU1MHB4Ow0KCW1hcmdpbjogMCBhdXRvOw0KfQ0KI2NvbG9ycGlja2VyIHsNCglwb3NpdGlvbjogYWJzb2x1dGU7DQoJYm9yZGVyOiAjMDAwMDAwIDFweCBzb2xpZDsNCgliYWNrZ3JvdW5kOiAjRkZGRkZGOw0KCWRpc3BsYXk6IG5vbmU7DQoJei1pbmRleDogMTAwMDI7DQp9DQoubW9kdWxlIHsNCglib3JkZXI6IDFweCBzb2xpZCAjY2NjOw0KCW1hcmdpbi1ib3R0b206IDVweDsNCgliYWNrZ3JvdW5kLWNvbG9yOiAjZmZmOw0KfQ0KLm1vZHVsZSBoMiwgLm1vZHVsZSBjYXB0aW9uIHsNCgltYXJnaW46IDA7DQoJcGFkZGluZzogMnB4IDVweCAzcHggNXB4Ow0KCWZvbnQtc2l6ZTogMTFweDsNCglmb250LXdlaWdodDogYm9sZDsNCgliYWNrZ3JvdW5kOiAjQ0NDQ0NDIHVybCgiZGF0YTppbWFnZS9naWY7YmFzZTY0LFIwbEdPRGxoQVFBV0FNUUFBTWpLeXNYSHg5JT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ICAgICA8L3Rib2R5Pg0KICAgIDwvdGFibGU+DQogIDwvZGl2Pg0KPC9mb3JtPg0KPC9kaXY+",
  2224.  
  2225. HISTORY_HTML: "data:text/html;charset=utf-8;base64,PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEvL0VO"+
  2226. "IiAiaHR0cDovL3d3dy53My5vcmcvVFIvaHRtbDQvc3RyaWN0LmR0ZCI%2BDQo8aHRtbD48aGVhZD4NCjxtZXRhIGh0dHAtZXF1aX"+
  2227. "Y9IkNvbnRlbnQtVHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04Ij4NCjxtZXRhIG5hbWU9IkF1dGhvciIgY2"+
  2228. "9udGVudD0ibXVuZ3VzaHVtZSI%2BDQo8bWV0YSBuYW1lPSJDb3B5cmlnaHQiIGNvbnRlbnQ9IsKpIDIwMDcsIE1vbmtleVIuY29t"+
  2229. "Ij4NCjxtZXRhIG5hbWU9Ik9yaWdpbmFsQXV0aG9yIiBjb250ZW50PSJKb25hdGhhbiBCdWNoYW5hbiI%2BDQo8bWV0YSBuYW1lPS"+
  2230. "JPcmlnaW5hbENvcHlyaWdodCIgY29udGVudD0iwqkgMjAwNiwgSm9uYXRoYW4gQnVjaGFuYW4iPg0KPHN0eWxlIHR5cGU9InRleH"+
  2231. "QvY3NzIj4NCmJvZHkgeyBtYXJnaW46MDsgcGFkZGluZzowOyBmb250LXNpemU6MTJweDsgZm9udC1mYW1pbHk6Ikx1Y2lkYSBHcm"+
  2232. "FuZGUiLCJCaXRzdHJlYW0gVmVyYSBTYW5zIixWZXJkYW5hLEFyaWFsLHNhbnMtc2VyaWY7IGNvbG9yOiMzMzM7IHdpZHRoOiA2OD"+
  2233. "ZweDsgbWFyZ2luOiAwIGF1dG87IH0NCi5tb2R1bGUgeyBib3JkZXI6IDFweCBzb2xpZCAjY2NjOyBtYXJnaW4tYm90dG9tOiA1cH"+
  2234. "g7IGJhY2tncm91bm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L3Rib2R5PjwvdGFibGU%2BDQogIDwv"+
  2264. "ZGl2Pg0KPC9mb3JtPg0KPC9ib2R5PjwvaHRtbD4%3D",
  2265.  
  2266. REFRESH_HTML : "data:text/html;base64,PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEvL0VOIiAiaHR0cDovL3"+
  2267. "d3dy53My5vcmcvVFIvaHRtbDQvc3RyaWN0LmR0ZCI%2BDQo8aHRtbD48aGVhZD48dGl0bGU%2BR29vZ2xlTW9ua2V5UiBVcGRhdG"+
  2268. "U8L3RpdGxlPg0KPG1ldGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7IGNoYXJzZXQ9VVRGLT"+
  2269. "giPg0KPG1ldGEgbmFtZT0iQXV0aG9yIiBjb250ZW50PSJtdW5ndXNodW1lIj4NCjxtZXRhIG5hbWU9IkNvcHlyaWdodCIgY29udG"+
  2270. "VudD0iwqkgMjAwNywgTW9ua2V5Ui5jb20iPg0KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4NCmJvZHkgeyBtYXJnaW46MDsgcGFkZG"+
  2271. "luZzowOyBmb250LXNpemU6MTJweDsgZm9udC1mYW1pbHk6Ikx1Y2lkYSBHcmFuZGUiLCJCaXRzdHJlYW0gVmVyYSBTYW5zIixWZX"+
  2272. "JkYW5hLEFyaWFsLHNhbnMtc2VyaWY7IGNvbG9yOiMzMzM7IHdpZHRoOiAzMDBweDsgbWFyZ2luOiAwIGF1dG87IH0NCi5tb2R1bG"+
  2273. "UgeyBib3JkZXI6IDFweCBzb2xpZCAjY2NjOyBtYXJnaW4tYm90dG9tOiA1cHg7IGJhY2tncm91bmQtY29sb3I6ICNmZmY7IH0NCi"+
  2274. "5tb2R1bGUgaDIgeyBtYXJnaW46IDA7IHBhZGRpbmc6IDJweCA1cHggM3B4IDVweDsgZm9udC1zaXplOiAxMXB4OyBmb250LXdlaW"+
  2275. "dodDogYm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ZnJlc2ggeW91ciBicm93c2VyIHRvIGNvbnRpbnVlLjwvdGQ%2BPC90cj"+
  2295. "4NCg0KCTx0cj48dGQgYWxpZ249ImNlbnRlciIgaGVpZ2h0PSI0MCIgdmFsaWduPSJtaWRkbGUiPjxpbnB1dCBuYW1lPSJidXR0b2"+
  2296. "4iIGNsYXNzPSJidG4iIG9uQ2xpY2s9ImphdmFzY3JpcHQ6dG9wLmxvY2F0aW9uLnJlbG9hZCh0cnVlKTsiIHZhbHVlPSJSZWZyZX"+
  2297. "NoIiB0eXBlPSJidXR0b24iPjwvdGQ%2BPC90cj4NCgk8L3Rib2R5PjwvdGFibGU%2BPC9kaXY%2BDQogIDwvZGl2Pg0KPC9mb3Jt"+
  2298. "Pg0KPC9ib2R5PjwvaHRtbD4%3D",
  2299.  
  2300. TOP_PNG : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM%2FrhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAK"+
  2301. "T2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUE"+
  2302. "G8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89%2BbN%2FrXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEK"+
  2303. "JHAAEAizZCFz%2FSMBAPh%2BPDwrIsAHvgABeNMLCADATZvAMByH%2Fw%2FqQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZT"+
  2304. "AKAEAGDLY2LjAFAtAGAnf%2BbTAICd%2BJl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDO"+
  2305. "EAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKB"+
  2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pfFuargqrLTA2YGmCWMF%2BW4WdU%2FSR%2FQ%2FweACo1SBSU%2Bf00AAAAAElFTk"+
  2346. "SuQmCC",
  2347.  
  2348. LOADING_GIF : "data:image/gif;base64,R0lGODlhIgAiAPQAADk5OVJSUlpaWmtra3t7e4SEhIyMjJSUlJycnKWlpa2trbW1tb29vcbGxs7Ozt"+
  2349. "bW1t7e3ufn5%2B%2Fv7%2Ff39%2F%2F%2F%2FwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAgFAAAAIf8LTkVU"+
  2350. "U0NBUEUyLjADAQAAACwAAAAAIgAiAAAFhiAljmRJLYmprqx4AG1cBgb5yjjVCDacxxKBYnT7lQoI0mBA9BlHEOToIYC4nE9RNCUa"+
  2351. "1CjFLLTAdQQmYKyYshUJkodAVhFBQwkpB2OtSygYEVMFVnwjDSh0hSwSDX6EiioOj5CUJRIPEJiamJATERESn6CflaWmp6ipqqus"+
  2352. "ra6vsLGys6ohACH5BAgFAAAALAAAAAAiACIAhCEhISkpKVpaWmNjY2tra3Nzc4SEhIyMjJSUlKWlpa2trbW1tb29vcbGxs7OztbW"+
  2353. "1t7e3ufn5%2B%2Fv7%2Ff39%2F%2F%2F%2FwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWTICWOZElJiqmuZkMqAi"+
  2354. "urUPHG4wNEM2ukIsWAJAj0SBPSwzASjiQA15HyUCRFEoPUKSIApqNF4kpBALkUwAIctoqWSW4BQGYv3BTDmhs4sEsKQAx%2BCjYJ"+
  2355. "ABBTDg91EwprKCQJBGwQixIjjg5%2FLBAPDhF1nCwRDw%2BJoz0SmKmtrq%2BwsbKztLW2t7i5uru8vb6%2FwL4hACH5BAgFAAAA"+
  2356. "LAAAAAAiACIAhCEhISkpKTk5OUJCQkpKSlJSUlpaWmNjY3Nzc4SEhIyMjJSUlJycnK2trbW1tb29vcbGxs7OztbW1t7e3ufn5%2B"+
  2357. "%2Fv7%2Ff39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407.  
  2408. // Color Picker Script from Flooble.com
  2409. // For more information, visit
  2410. // http://www.flooble.com/scripts/colorpicker.php
  2411. // Copyright 2003 Animus Pactum Consulting inc.
  2412.  
  2413. // You may use and distribute this code freely, as long as
  2414. // you keep this copyright notice and the link to flooble.com
  2415. // if you chose to remove them, you must link to the page
  2416. // listed above from every web page where you use the color
  2417. // picker code.
  2418. //---------------------------------------------------------
  2419. colorPicker : {
  2420. perline : 5,
  2421. divSet : false,
  2422. curId : null,
  2423. colorLevels : Array('A', 'B', 'C', 'D', 'E', 'F'),
  2424. colorArray : Array(),
  2425.  
  2426. addColor : function(r, g, b) {
  2427. this.colorArray[this.colorArray.length] = '#' + this.colorLevels[r] + this.colorLevels[r] + this.colorLevels[g] + this.colorLevels[g] + this.colorLevels[b] + this.colorLevels[b];
  2428. },
  2429.  
  2430. setColor : function(color) {
  2431. var that = this;
  2432. return function(){
  2433. var link = document.getElementById(that.curId);
  2434. var field = document.getElementById(that.curId + 'field');
  2435. var picker = document.getElementById('colorpicker');
  2436. field.value = color;
  2437. if (color == '') {
  2438. link.style.background = 'none';
  2439. link.style.color = 'none';
  2440. color = 'none';
  2441. } else {
  2442. link.style.background = color;
  2443. link.style.color = color;
  2444. }
  2445. picker.style.display = 'none';
  2446. eval(document.getElementById(that.curId + 'field').title);
  2447. }.bind(this)
  2448. },
  2449.  
  2450. setDiv : function(id) {
  2451. if (!document.createElement) { return; }
  2452. this.genColors();
  2453.  
  2454. var div = document.buildElement('div',{id:'colorpicker'});
  2455. var spn = document.buildElement('span',{style:"font-family:Verdana; font-size:11px;"});
  2456. var a = document.buildElement('a',{href:"javascript:;"},'No color','click',this.setColor(''));
  2457. spn.appendChild(a);
  2458. spn.appendChild(this.getColorTable());
  2459. div.appendChild(spn);
  2460. document.body.appendChild(div);
  2461. this.divSet = true;
  2462. },
  2463.  
  2464. pickColor : function(id) {
  2465. id = 'ResHue';
  2466. if (!this.divSet) { this.setDiv(id); }
  2467. var picker = document.getElementById('colorpicker');
  2468. if (id == this.curId && picker.style.display == 'block') {
  2469. picker.style.display = 'none';
  2470. return;
  2471. }
  2472. this.curId = id;
  2473. var thelink = document.getElementById(id);
  2474. picker.style.top = (this.getAbsoluteOffsetTop(thelink) + 20) + "px";
  2475. picker.style.left = this.getAbsoluteOffsetLeft(thelink) + "px";
  2476. picker.style.display = 'block';
  2477. },
  2478.  
  2479. genColors : function () {
  2480. for (a = 0; a < this.colorLevels.length-1; a++)
  2481. this.addColor(a,a,5);
  2482.  
  2483. for (a = 0; a < this.colorLevels.length-1; a++)
  2484. this.addColor(a,5,a);
  2485.  
  2486. for (a = 0; a < this.colorLevels.length-1; a++)
  2487. this.addColor(5,a,a);
  2488.  
  2489. for (a = 0; a < this.colorLevels.length-1; a++)
  2490. this.addColor(5,5,a);
  2491.  
  2492. for (a = 0; a < this.colorLevels.length-1; a++)
  2493. this.addColor(a,5,5);
  2494.  
  2495. for (a = 0; a < this.colorLevels.length-1; a++)
  2496. this.addColor(5,a,5);
  2497.  
  2498. this.colorArray[this.colorArray.length] = "#E5ECF9";
  2499. this.colorArray[this.colorArray.length] = "#FAFAE6";
  2500.  
  2501. return this.colorArray;
  2502. },
  2503. getColorTable : function () {
  2504. var colors = this.colorArray;
  2505. var tab = document.buildElement('table',{border:"0", cellspacing:"1", cellpadding:"1"});
  2506.  
  2507. for (var i = 0; i < colors.length; i++) {
  2508. if (i % this.perline == 0) { var tr = document.buildElement('tr'); tab.appendChild(tr) }
  2509. var td = document.buildElement('td',{bgcolor:colors[i]});
  2510. var a = document.buildElement('a',{style:"outline: 1px solid #000000; color:"+colors[i]+"; background: ' + colors[i] + ';font-size: 11px;", title:colors[i],href:"javascript:;"},"&nbsp;&nbsp;&nbsp;&nbsp;",'click',this.setColor(colors[i]));
  2511. td.appendChild(a);
  2512. tr.appendChild(td)
  2513. }
  2514. return tab;
  2515. },
  2516. getColorTable2 : function () {
  2517. var colors = this.colorArray;
  2518. var tableCode = '';
  2519. tableCode += '<table border="0" cellspacing="1" cellpadding="1">';
  2520. for (i = 0; i < colors.length; i++) {
  2521. if (i % this.perline == 0) { tableCode += '<tr>'; }
  2522. tableCode += '<td bgcolor="#000000"><a style="outline: 1px solid #000000; color: '
  2523. + colors[i] + '; background: ' + colors[i] + ';font-size: 11px;" title="'
  2524. + colors[i] + '" href="javascript:setColor(\'' + colors[i] + '\');">&nbsp;&nbsp;&nbsp;&nbsp;</a></td>';
  2525. if (i % this.perline == this.perline - 1) { tableCode += '</tr>'; }
  2526. }
  2527. if (i % this.perline != 0) { tableCode += '</tr>'; }
  2528. tableCode += '</table>';
  2529. return tableCode;
  2530. },
  2531. relateColor : function (id) {
  2532.  
  2533. return function(e){
  2534.  
  2535. var color = (e.srcElement.value)
  2536. var link = document.getElementById(id);
  2537. if (color == '') {
  2538. link.style.background = 'none';
  2539. link.style.color = 'none';
  2540. color = 'none';
  2541. } else {
  2542. link.style.background = color;
  2543. link.style.color = color;
  2544. }
  2545. eval(document.getElementById(id + 'field').title);
  2546. }.bind(this)
  2547. },
  2548. getAbsoluteOffsetTop : function (obj) {
  2549. var top = obj.offsetTop;
  2550. var parent = obj.offsetParent;
  2551. while (parent != document.body && parent!==null) {
  2552. top += parent.offsetTop;
  2553. parent = parent.offsetParent;
  2554. }
  2555. return top;
  2556. },
  2557.  
  2558. getAbsoluteOffsetLeft : function (obj) {
  2559. var left = obj.offsetLeft;
  2560. var parent = obj.offsetParent;
  2561. while (parent != document.body && parent!==null) {
  2562. left += parent.offsetLeft;
  2563. parent = parent.offsetParent;
  2564. }
  2565. return left;
  2566. }
  2567. },
  2568. bgBordertog : function () {
  2569. var e = document.getElementById('BGBorderlink');
  2570. e.innerHTML = (e.innerHTML=='background') ? 'border' : 'background';
  2571. },
  2572. flowtog : function () {
  2573. var e = document.getElementById('flowimg');
  2574. e.className = (e.className=='l2r') ? 't2b' : 'l2r';
  2575. }
  2576.  
  2577. };
  2578.  
  2579. /* Prototypes and additional document functions */
  2580. document.getElementByXPath = function(XPath, contextNode)
  2581. {
  2582. var a = this.evaluate(XPath, (contextNode || this), null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
  2583. return (a.snapshotLength ? a.snapshotItem(0) : null);
  2584. };
  2585.  
  2586. document.getElementsByXPath = function(XPath, contextNode)
  2587. {
  2588. var ret=[], i=0;
  2589. var a = this.evaluate(XPath, (contextNode || this), null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
  2590. while(a.snapshotItem(i))
  2591. {
  2592. ret.push(a.snapshotItem(i++));
  2593. }
  2594. return ret;
  2595. };
  2596.  
  2597. document.buildElement = function(type, atArr, inner, action, listen)
  2598. {
  2599. var e = document.createElement(type);
  2600. for (var at in atArr)
  2601. {
  2602. if (atArr.hasOwnProperty(at))
  2603. {
  2604. e.setAttribute(at, atArr[at]);
  2605. }
  2606. }
  2607. if(action && listen)
  2608. {
  2609. e.addEventListener(action, listen, false);
  2610. }
  2611. if(inner)
  2612. {
  2613. e.innerHTML = inner;
  2614. }
  2615. return e;
  2616. };
  2617.  
  2618. Function.prototype.bind = function(object)
  2619. {
  2620. var __method = this;
  2621. return function()
  2622. {
  2623. __method.apply(object, arguments);
  2624. }
  2625. };
  2626.  
  2627. String.prototype.repeat = function(l)
  2628. {
  2629. return new Array(l+1).join(this);
  2630. };
  2631.  
  2632. String.prototype.retNum = function()
  2633. {
  2634. return (isNaN(this) ? 0 : (+this));
  2635. };
  2636.  
  2637. if (typeof GM_getValue === "undefined" || GM_getValue("a", "b") === undefined) {
  2638. if(typeof window.localStorage == "object") {
  2639. GM_setValue = function ( key, value ) {
  2640. window.localStorage.setItem( key, value );
  2641. }
  2642. }
  2643. else{
  2644. function getRecoverableString(oVar,notFirst) {
  2645. var oType = typeof(oVar);
  2646. if( ( oType == 'null' ) || ( oType == 'object' && !oVar ) ) {
  2647. //most browsers say that the typeof for null is 'object', but unlike a real
  2648. //object, it will not have any overall value
  2649. return 'null';
  2650. }
  2651. if( oType == 'undefined' ) { return 'window.uDfXZ0_d'; }
  2652. if( oType == 'object' ) {
  2653. //Safari throws errors when comparing non-objects with window/document/etc
  2654. if( oVar == window ) { return 'window'; }
  2655. if( oVar == document ) { return 'document'; }
  2656. if( oVar == document.body ) { return 'document.body'; }
  2657. if( oVar == document.documentElement ) { return 'document.documentElement'; }
  2658. }
  2659. if( oVar.nodeType && ( oVar.childNodes || oVar.ownerElement ) ) { return '{error:\'DOM node\'}'; }
  2660. if( !notFirst ) {
  2661. Object.prototype.toRecoverableString = function (oBn) {
  2662. if( this.tempLockIgnoreMe ) { return '{\'LoopBack\'}'; }
  2663. this.tempLockIgnoreMe = true;
  2664. var retVal = '{', sepChar = '', j;
  2665. for( var i in this ) {
  2666. if( i == 'toRecoverableString' || i == 'tempLockIgnoreMe' || i == 'prototype' || i == 'constructor' ) { continue; }
  2667. if( oBn && ( i == 'index' || i == 'input' || i == 'length' || i == 'toRecoverableObString' ) ) { continue; }
  2668. j = this[i];
  2669. if( !i.match(basicObPropNameValStr) ) {
  2670. //for some reason, you cannot use unescape when defining peoperty names inline
  2671. for( var x = 0; x < cleanStrFromAr.length; x++ ) {
  2672. i = i.replace(cleanStrFromAr[x],cleanStrToAr[x]);
  2673. }
  2674. i = '\''+i+'\'';
  2675. } else if( window.ActiveXObject && navigator.userAgent.indexOf('Mac') + 1 && !navigator.__ice_version && window.ScriptEngine && ScriptEngine() == 'JScript' && i.match(/^\d+$/) ) {
  2676. //IE mac does not allow numerical property names to be used unless they are quoted
  2677. i = '\''+i+'\'';
  2678. }
  2679. retVal += sepChar+i+':'+getRecoverableString(j,true);
  2680. sepChar = ',';
  2681. }
  2682. retVal += '}';
  2683. this.tempLockIgnoreMe = false;
  2684. return retVal;
  2685. };
  2686. Array.prototype.toRecoverableObString = Object.prototype.toRecoverableString;
  2687. Array.prototype.toRecoverableString = function () {
  2688. if( this.tempLock ) { return '[\'LoopBack\']'; }
  2689. if( !this.length ) {
  2690. var oCountProp = 0;
  2691. for( var i in this ) { if( i != 'toRecoverableString' && i != 'toRecoverableObString' && i != 'tempLockIgnoreMe' && i != 'prototype' && i != 'constructor' && i != 'index' && i != 'input' && i != 'length' ) { oCountProp++; } }
  2692. if( oCountProp ) { return this.toRecoverableObString(true); }
  2693. }
  2694. this.tempLock = true;
  2695. var retVal = '[';
  2696. for( var i = 0; i < this.length; i++ ) {
  2697. retVal += (i?',':'')+getRecoverableString(this[i],true);
  2698. }
  2699. retVal += ']';
  2700. delete this.tempLock;
  2701. return retVal;
  2702. };
  2703. Boolean.prototype.toRecoverableString = function () {
  2704. return ''+this+'';
  2705. };
  2706. Date.prototype.toRecoverableString = function () {
  2707. return 'new Date('+this.getTime()+')';
  2708. };
  2709. Function.prototype.toRecoverableString = function () {
  2710. return this.toString().replace(/^\s+|\s+$/g,'').replace(/^function\s*\w*\([^\)]*\)\s*\{\s*\[native\s+code\]\s*\}$/i,'function () {[\'native code\'];}');
  2711. };
  2712. Number.prototype.toRecoverableString = function () {
  2713. if( isNaN(this) ) { return 'Number.NaN'; }
  2714. if( this == Number.POSITIVE_INFINITY ) { return 'Number.POSITIVE_INFINITY'; }
  2715. if( this == Number.NEGATIVE_INFINITY ) { return 'Number.NEGATIVE_INFINITY'; }
  2716. return ''+this+'';
  2717. };
  2718. RegExp.prototype.toRecoverableString = function () {
  2719. return '\/'+this.source+'\/'+(this.global?'g':'')+(this.ignoreCase?'i':'');
  2720. };
  2721. String.prototype.toRecoverableString = function () {
  2722. var oTmp = escape(this);
  2723. if( oTmp == this ) { return '\''+this+'\''; }
  2724. return 'unescape(\''+oTmp+'\')';
  2725. };
  2726. }
  2727. if( !oVar.toRecoverableString ) { return '{error:\'internal object\'}'; }
  2728. var oTmp = oVar.toRecoverableString();
  2729. if( !notFirst ) {
  2730. //prevent it from changing for...in loops that the page may be using
  2731. delete Object.prototype.toRecoverableString;
  2732. delete Array.prototype.toRecoverableObString;
  2733. delete Array.prototype.toRecoverableString;
  2734. delete Boolean.prototype.toRecoverableString;
  2735. delete Date.prototype.toRecoverableString;
  2736. delete Function.prototype.toRecoverableString;
  2737. delete Number.prototype.toRecoverableString;
  2738. delete RegExp.prototype.toRecoverableString;
  2739. delete String.prototype.toRecoverableString;
  2740. }
  2741. return oTmp;
  2742. }
  2743.  
  2744. GM_setValue = function ( cookieName, cookieValue, lifeTime ) {
  2745. if( !cookieName ) { return; }
  2746. if( lifeTime == "delete" ) { lifeTime = -10; } else { lifeTime = 31536000; }
  2747. document.cookie = escape( cookieName ) + "=" + escape( getRecoverableString( cookieValue ) ) +
  2748. ";expires=" + ( new Date( ( new Date() ).getTime() + ( 1000 * lifeTime ) ) ).toGMTString() + ";path=/";
  2749. }
  2750. }
  2751. }
  2752. if (typeof GM_getValue === "undefined" || GM_getValue("a", "b") === undefined){
  2753. if(typeof window.localStorage == "object") {
  2754. GM_getValue = function ( key, defaultValue ) {
  2755. var value = window.localStorage.getItem(key);
  2756. if( value == null ) value = defaultValue;
  2757. else if(value=='true') value = true;
  2758. else if(value=='false') value = false;
  2759. return value;
  2760. }
  2761. }
  2762. else{
  2763. GM_getValue = function ( cookieName, oDefault ) {
  2764. var cookieJar = document.cookie.split( "; " );
  2765. for( var x = 0; x < cookieJar.length; x++ ) {
  2766. var oneCookie = cookieJar[x].split( "=" );
  2767. if( oneCookie[0] == escape( cookieName ) ) {
  2768. try {
  2769. eval('var footm = '+unescape( oneCookie[1] ));
  2770. } catch(e) { return oDefault; }
  2771. return footm;
  2772. }
  2773. }
  2774. return oDefault;
  2775. }
  2776. }
  2777. }
  2778. if (typeof GM_xmlhttpRequest === "undefined") {
  2779. GM_xmlhttpRequest = function (details) {
  2780. var xmlhttp = new XMLHttpRequest();
  2781. xmlhttp.onreadystatechange = function() {
  2782. var responseState = {
  2783. responseXML:(xmlhttp.readyState==4 ? xmlhttp.responseXML : ''),
  2784. responseText:(xmlhttp.readyState==4 ? xmlhttp.responseText : ''),
  2785. readyState:xmlhttp.readyState,
  2786. responseHeaders:(xmlhttp.readyState==4 ? xmlhttp.getAllResponseHeaders() : ''),
  2787. status:(xmlhttp.readyState==4 ? xmlhttp.status : 0),
  2788. statusText:(xmlhttp.readyState==4 ? xmlhttp.statusText : '')
  2789. }
  2790. if (details["onreadystatechange"]) {
  2791. details["onreadystatechange"](responseState);
  2792. }
  2793. if (xmlhttp.readyState==4) {
  2794. if (details["onload"] && xmlhttp.status>=200 && xmlhttp.status<300) {
  2795. details["onload"](responseState);
  2796. }
  2797. if (details["onerror"] && (xmlhttp.status<200 || xmlhttp.status>=300)) {
  2798. details["onerror"](responseState);
  2799. }
  2800. }
  2801. }
  2802. try {
  2803. //cannot do cross domain
  2804. xmlhttp.open(details.method, details.url);
  2805. // alert(details.method +':'+ details.url)
  2806. } catch(e) {
  2807. if( details["onerror"] ) {
  2808. //simulate a real error
  2809. details["onerror"]({responseXML:'',responseText:'',readyState:4,responseHeaders:'',status:403,statusText:'Forbidden'});
  2810. }
  2811. return;
  2812. }
  2813. if (details.headers) {
  2814. for (var prop in details.headers) {
  2815. xmlhttp.setRequestHeader(prop, details.headers[prop]);
  2816. }
  2817. }
  2818. xmlhttp.send((typeof(details.data)!='undefined')?details.data:null);
  2819. }
  2820. }
  2821.  
  2822. // Browser detect
  2823. // http://www.quirksmode.org/js/detect.html
  2824. // A useful but often overrated JavaScript function is the browser detect.
  2825. // Sometimes you want to give specific instructions or load a new page in case the viewer uses, for instance, Safari.
  2826. var BrowserDetect = {
  2827. init: function () {
  2828. this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
  2829. this.version = this.searchVersion(navigator.userAgent)
  2830. || this.searchVersion(navigator.appVersion)
  2831. || "an unknown version";
  2832. this.OS = this.searchString(this.dataOS) || "an unknown OS";
  2833. this.csQuery = this.searchCSQuery(this.dataBrowser) || false;
  2834. return (this.browser != "An unknown browser");
  2835. },
  2836. searchString: function (data) {
  2837. for (var i=0;i<data.length;i++) {
  2838. var dataString = data[i].string;
  2839. var dataProp = data[i].prop;
  2840. this.versionSearchString = data[i].versionSearch || data[i].identity;
  2841. if (dataString) {
  2842. if (dataString.indexOf(data[i].subString) != -1)
  2843. return data[i].identity;
  2844. }
  2845. else if (dataProp)
  2846. return data[i].identity;
  2847. }
  2848. },
  2849. searchCSQuery: function (data) {
  2850. for (var i=0;i<data.length;i++) {
  2851. var dataString = data[i].string;
  2852. var dataProp = data[i].prop;
  2853. this.versionSearchString = data[i].versionSearch || data[i].identity;
  2854. if (dataString) {
  2855. if (dataString.indexOf(data[i].subString) != -1)
  2856. return data[i].csQuery;
  2857. }
  2858. else if (dataProp)
  2859. return data[i].csQuery;
  2860. }
  2861. },
  2862. searchVersion: function (dataString) {
  2863. var index = dataString.indexOf(this.versionSearchString);
  2864. if (index == -1) return;
  2865. return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
  2866. },
  2867. dataBrowser: [
  2868. {
  2869. string: navigator.userAgent,
  2870. subString: "Chrome",
  2871. identity: "Chrome",
  2872. csQuery: false
  2873. },
  2874. { string: navigator.userAgent,
  2875. subString: "OmniWeb",
  2876. versionSearch: "OmniWeb/",
  2877. identity: "OmniWeb",
  2878. csQuery: false
  2879. },
  2880. {
  2881. string: navigator.vendor,
  2882. subString: "Apple",
  2883. identity: "Safari",
  2884. versionSearch: "Version",
  2885. csQuery: false
  2886. },
  2887. {
  2888. prop: window.opera,
  2889. identity: "Opera",
  2890. csQuery: false
  2891. },
  2892. {
  2893. string: navigator.vendor,
  2894. subString: "iCab",
  2895. identity: "iCab",
  2896. csQuery: false
  2897. },
  2898. {
  2899. string: navigator.vendor,
  2900. subString: "KDE",
  2901. identity: "Konqueror",
  2902. csQuery: false
  2903. },
  2904. {
  2905. string: navigator.userAgent,
  2906. subString: "Firefox",
  2907. identity: "Firefox",
  2908. csQuery: true
  2909. },
  2910. {
  2911. string: navigator.vendor,
  2912. subString: "Camino",
  2913. identity: "Camino",
  2914. csQuery: false
  2915. },
  2916. { // for newer Netscapes (6+)
  2917. string: navigator.userAgent,
  2918. subString: "Netscape",
  2919. identity: "Netscape",
  2920. csQuery: false
  2921. },
  2922. {
  2923. string: navigator.userAgent,
  2924. subString: "MSIE",
  2925. identity: "Explorer",
  2926. versionSearch: "MSIE",
  2927. csQuery: false
  2928. },
  2929. {
  2930. string: navigator.userAgent,
  2931. subString: "Gecko",
  2932. identity: "Mozilla",
  2933. versionSearch: "rv",
  2934. csQuery: false
  2935. },
  2936. { // for older Netscapes (4-)
  2937. string: navigator.userAgent,
  2938. subString: "Mozilla",
  2939. identity: "Netscape",
  2940. versionSearch: "Mozilla",
  2941. csQuery: false
  2942. }
  2943. ],
  2944. dataOS : [
  2945. {
  2946. string: navigator.platform,
  2947. subString: "Win",
  2948. identity: "Windows"
  2949. },
  2950. {
  2951. string: navigator.platform,
  2952. subString: "Mac",
  2953. identity: "Mac"
  2954. },
  2955. {
  2956. string: navigator.userAgent,
  2957. subString: "iPhone",
  2958. identity: "iPhone/iPod"
  2959. },
  2960. {
  2961. string: navigator.platform,
  2962. subString: "Linux",
  2963. identity: "Linux"
  2964. }
  2965. ]
  2966.  
  2967. };
  2968. function findPos(obj) {
  2969. var curleft = curtop = 0;
  2970. if (obj.offsetParent) {
  2971. do {
  2972. curleft += obj.offsetLeft;
  2973. curtop += obj.offsetTop;
  2974. } while ((obj = obj.offsetParent));
  2975. }
  2976. return [curleft,curtop];
  2977. }
  2978. function getStyle(el,styleProp)
  2979. {
  2980. if (el.currentStyle)
  2981. var y = el.currentStyle[styleProp];
  2982. else if (window.getComputedStyle)
  2983. var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
  2984. if((match = y.match(/^(\d+)px$/))) y = +match[1];
  2985. return y;
  2986. }
  2987. var monkeyr = {
  2988. toLog : false,
  2989. toLogE : false,
  2990. log : function(){
  2991. if(!this.toLog) return;
  2992. this._log.apply(this, arguments);
  2993. },
  2994. logE : function(){
  2995. if(!this.toLogE) return;
  2996. this._log.apply(this, arguments);
  2997. },
  2998. logA : function(){
  2999. if(!this.toLog && !this.toLogE) return;
  3000. this._log.apply(this, arguments);
  3001. },
  3002. _log : function(){
  3003. if(window.console){
  3004. if (arguments.length == 1) {
  3005. console.log( arguments[0] );
  3006. }
  3007. else{
  3008. console.log( Array.prototype.slice.call(arguments) );
  3009. }
  3010. }
  3011. }
  3012. }
  3013. // monkeyr.toLog = true;
  3014. // monkeyr.toLogE = true;
  3015. // UIL.watching = '#main';
  3016. /* Run the browser detect script */
  3017. BrowserDetect.init();
  3018. /* Run the update check */
  3019. UIL.UI.updateCheckRequest();
  3020. /* Run the script */
  3021. UIL.init();
  3022. })();
  3023.