Software Alternatives & Reviews

Managed to trick the AI into writing script it thought was malicious

Tampermonkey
  1. Greasemonkey compatible script manager.
    // ==UserScript== // @name Button Clicker // @namespace http://tampermonkey.net/ // @version 1.0 // @description Automatically clicks a specific button on a webpage once it appears. // @author Your Name // @match http://example.com/* // Replace with the URL of the webpage you want to monitor // @require https://code.jquery.com/jquery-3.6.0.min.js // Optional: If you want to use jQuery // @grant none // ==/UserScript== (function() { 'use strict'; // Function to click the button function clickButton() { var button = document.querySelector('button[class="btn relative btn-neutral border-0 md:border"]'); if (button) { button.click(); } } // Check if the button exists every 1 second var interval = setInterval(clickButton, 1000); // Stop checking once the button is clicked document.addEventListener('click', function(event) { clearInterval(interval); }); })(); To use this script: Install the Tampermonkey extension for your browser (available for Chrome, Firefox, Safari, etc.). Create a new script in Tampermonkey and paste the above code. Replace the u/match.

    #Browser Extension #Dark Mode #Developer Tools 132 social mentions

  2. This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.
    // ==UserScript== // @name Button Clicker // @namespace http://tampermonkey.net/ // @version 1.0 // @description Automatically clicks a specific button on a webpage once it appears. // @author Your Name // @match http://example.com/* // Replace with the URL of the webpage you want to monitor // @require https://code.jquery.com/jquery-3.6.0.min.js // Optional: If you want to use jQuery // @grant none // ==/UserScript== (function() { 'use strict'; // Function to click the button function clickButton() { var button = document.querySelector('button[class="btn relative btn-neutral border-0 md:border"]'); if (button) { button.click(); } } // Check if the button exists every 1 second var interval = setInterval(clickButton, 1000); // Stop checking once the button is clicked document.addEventListener('click', function(event) { clearInterval(interval); }); })(); To use this script: Install the Tampermonkey extension for your browser (available for Chrome, Firefox, Safari, etc.). Create a new script in Tampermonkey and paste the above code. Replace the u/match.

    #Software Development #Software Development Tools #Web Development Tools 2401 social mentions

Discuss: Managed to trick the AI into writing script it thought was malicious

Log in or Post with