Skip Go to

Redirects directly to the final page without "Yes, I confirmed"

  1. // ==UserScript==
  2. // @name Skip Go to
  3. // @namespace Violentmonkey Scripts
  4. // @match *://forums.socialmediagirls.com/goto/*
  5. // @icon https://cdn0.iconfinder.com/data/icons/arrow-2-1/512/826-21-512.png
  6. // @grant none
  7. // @run-at document-start
  8. // @version 0.1
  9. // @author drak4r
  10. // @description Redirects directly to the final page without "Yes, I confirmed"
  11. // @license GPLv3
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. 'use strict';
  16.  
  17. // Wait for the document to be completely loaded
  18. window.addEventListener('load', function() {
  19. // Select the link that contains the specific class
  20. const link = document.querySelector('a.button--cta.button');
  21.  
  22. // Checks if the link exists
  23. if (link) {
  24. // Capture the href URL
  25. const url = link.href;
  26.  
  27. // Redirects to the captured URL
  28. window.location.href = url;
  29. }
  30. });
  31. })();