Jump to content

Recommended Posts

Posted (edited)
// ==UserScript==
// @name         New Userscript
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://example.com/example
// @grant        GM.setClipboard
// ==/UserScript==

(function() {
  var waitForEl = setInterval(function() {
    if (typeof document.querySelector('.example') != 'undefined') {
      document.querySelector('.example').focus();
      GM.setClipboard('fillMe:test text');
      clearInterval(waitForEl);
    }
  }, 100); // wait for element to exist
})();

the above snippet will wait every millisecond for a form with the classname example to exist. once it does it focuses on the form then sets the clipboard to fillMe:test text

While 1
   If StringInStr(ClipGet(), 'fillMe:') Then
      $cliprep = StringReplace(ClipGet(), 'fillMe:', '')
      ClipPut($cliprep)
      Send('^v')
      ClipPut('')
   EndIf
   Sleep(100)
WEnd

and then you have autoit infinitely check clip for wildcard fillMe: which then will send the specified text to the currently focused form. most forms on most websites will not work if you simply use .value because of the istrusted event. the only way to activate most forms on most websites these days is with actual end user hardware input, or by figuring out functions attached to these forms which is not usually worth doing. anyone whos needed an easy fix for this issue should thank me. run windows in a virtualbox and you can even have this run silently in the background without needing to keep the browser window active

Edited by lionfaggot

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...