Better Turnip.exchange

Add a link to notes

  1. // ==UserScript==
  2. // @name Better Turnip.exchange
  3. // @namespace http://random.com
  4. // @description Add a link to notes
  5. // @include https://turnip.exchange/islands
  6. // @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
  7. // @version 0.2.20200507
  8. // ==/UserScript==
  9.  
  10. $( document ).ready(function() {
  11.  
  12. $(function(){
  13. function addlink(){
  14. $( ".note" ).each(function( index ) {
  15. $(this).wrap($('<a>',{
  16. href: 'https://turnip.exchange/island/' + $(this).attr('data-turnip-code'),
  17. class: 'notelink'
  18. }));
  19. });
  20. $('.notelink').css('color', '#ffffff');
  21. $('.notelink').css('text-decoration', 'none');
  22. };
  23. window.setTimeout( addlink, 5000 ); // 5 seconds
  24. });
  25.  
  26. });
  27.