Go To Line Feature in ASIDE.IO

Enable Go To Line Feature in ASIDE.IO

  1. // ==UserScript==
  2. // @name Go To Line Feature in ASIDE.IO
  3. // @version 1.0.1
  4. // @description Enable Go To Line Feature in ASIDE.IO
  5. // @author Shruti Sridharan
  6. // @match https://www.aside.io/*
  7. // @grant https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js
  8. // @namespace https://greasyfork.org/users/56475
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. jQuery( document ).ready(
  15. function() {
  16. jQuery( ".cf-section" ).first().append(
  17. jQuery( "<span/>" )
  18. .attr( "class", "cf-sub-test hidden foot-btn keep-left small-right-marg unselectable" )
  19. .attr( "style", "display: inline" )
  20. .attr( "title", "Go To Line" )
  21. .html( "go to line" )
  22. .click(
  23. function() {
  24. var lineNo = prompt( "Enter Line Number:" );
  25. if( !isNaN( lineNo ) ) {
  26. editor.gotoLine( lineNo, 0, true );
  27. }
  28. }
  29. )
  30. );
  31. }
  32. );
  33. })();