Like Bomber

Like all posts including comments on the selected thread with only one click. By SyfuxX edited by lanceq

当前为 2016-10-11 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Like Bomber
  3. // @autor Lanceq
  4. // @namespace http://lanceq.pl
  5. // @description Like all posts including comments on the selected thread with only one click. By SyfuxX edited by lanceq
  6. // @include http://facebook.com
  7. // @include http://facebook.com/*
  8. // @include http://www.facebook.com
  9. // @include http://www.facebook.com/*
  10. // @include https://facebook.com/*
  11. // @include https://facebook.com
  12. // @include https://www.facebook.com/*
  13. // @include https://www.facebook.com
  14. // @version 1.0
  15. // @grant none
  16. // ==/UserScript==
  17.  
  18.  
  19. var btnFbLike = document.createElement( 'input' );
  20. with( btnFbLike ) {
  21. setAttribute( 'type', 'button' );
  22. setAttribute( 'value', 'Bombarduj' );
  23. setAttribute( 'onclick', 'javascript: var inputs = document.getElementsByClassName("_48-k UFILikeLink"); for(var i=0; i<inputs.length;i++) { inputs[i].click(); }' );
  24. setAttribute( 'onclick', 'javascript: var inputs = document.getElementsByClassName("UFILikeLink"); for(var i=0; i<inputs.length;i++) { inputs[i].click(); }' );
  25. setAttribute( 'style', 'position: fixed; top: 55px; left: 10px; font-weight: bold; font-size: 12px; font-family: calibri; color: white; black; border: 1px solid; border-radius: 25px; background-color: rgb(70, 98, 158); padding: 2px 5px 2px 5px;' )
  26. }
  27.  
  28. document.getElementsByTagName( 'body' )[ 0 ].appendChild( btnFbLike );