LogFAQs > #972762955

LurkerFAQs, Active DB, DB1, DB2, DB3, DB4, DB5, DB6, DB7, DB8, DB9, DB10, Database 11 ( 12.2022-11.2023 ), DB12, Clear
Topic List
Page List: 1
TopicIs there a way to configure my browser so that whenever I visit a certain page,
badjay
04/10/23 10:04:51 PM
#2:


Let's ask chat gpt.

Yes, you can use browser extensions such as Tampermonkey or Greasemonkey to inject custom JavaScript code into specific web pages. These extensions allow you to create scripts that run when you visit a particular website and can manipulate the page in various ways.
Here's an example Tampermonkey script that adds a red border to the search bar on the Wiktionary main page:
javascript

// ==UserScript==
// @name Add border to Wiktionary search bar
// @namespace https://example.com/
// @version 1.0
// @description Adds a red border to the search bar on the Wiktionary main page
// @author Your Name
// @match https://en.m.wiktionary.org/wiki/Wiktionary:Main_Page
// @grant none
// ==/UserScript==

(function() {
'use strict';

var searchInput = document.getElementById('searchInput');
searchInput.style.border = '1px solid red';
})();

To use this script, you would need to install Tampermonkey (or a similar extension), create a new script, and paste the code into the editor. Then save the script and visit the Wiktionary main page to see the border around the search bar.
Note that you may need to adjust the script if the page source changes in the future (e.g., if the search bar's ID or class name changes).

Looks like you can.

---
[05:45:34] I bought an American L and it was like a tent
... Copied to Clipboard!
Topic List
Page List: 1