First florr.io script ever

this does nothing

  1. // ==UserScript==
  2. // @name First florr.io script ever
  3. // @namespace -
  4. // @version 1.1.6
  5. // @description this does nothing
  6. // @author dreadmania
  7. // @include *://florr.io/*
  8. // @connect florr.io
  9. // @grant none
  10. // @require http://code.jquery.com/jquery-latest.js
  11. // ==/UserScript==
  12.  
  13. $(document).ready(function() { alert('This script does nothing. It could soon. Just let me learn javascript.');});
  14. var hrefs = new Array();
  15. var elements = $('.headline > a');
  16. elements.each(function() {
  17. hrefs.push($(this).attr('href'));
  18. });
  19.  
  20. $('body').append('<input type="button" value="Does this do anything" id="CP">')
  21. $("#CP").css("position", "fixed").css("top", 0).css("left", 0);
  22.  
  23. $('#CP').click(function(){
  24. $.each(hrefs, function(index, value) {
  25. alert('What are you thinking of?!');
  26. });
  27. });