StartPage.com - Number Results

Number search results on StartPage.com and other Ixquick sites - StartingPage.com and Ixquick.com

目前为 2019-04-11 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name StartPage.com - Number Results
  3. // @namespace tag:r-a-y@gmx.com,2012:monkey
  4. // @description Number search results on StartPage.com and other Ixquick sites - StartingPage.com and Ixquick.com
  5. // @include http://*startpage.com/*
  6. // @include https://*startpage.com/*
  7. // @include http://*startingpage.com/*
  8. // @include https://*startingpage.com/*
  9. // @include http://*ixquick.com/*
  10. // @include https://*ixquick.com/*
  11. // @author r-a-y
  12. // @version 1.1
  13. // @license GPL v3
  14. // ==/UserScript==
  15.  
  16. var results = document.querySelectorAll( 'li.search-item' );
  17.  
  18. for ( i = 0, len = results.length; i < len; ++i ) {
  19. newSpan = document.createElement( "span" );
  20. newSpan.setAttribute( "style", "float:left; font-weight:600; font-size:.9em !important; display:inline-block; margin-top:2px; margin-right:5px;" );
  21.  
  22. newContent = document.createTextNode( ( ( pageOptions.adPage - 1 ) * len + i + 1 ) + ". ");
  23. newSpan.appendChild( newContent );
  24.  
  25. results[i].insertBefore( newSpan, results[i].firstChild );
  26. }