diff --git a/content_scripts/fairlang.js b/content_scripts/fairlang.js index d53eb92..a577c7b 100644 --- a/content_scripts/fairlang.js +++ b/content_scripts/fairlang.js @@ -1,4 +1,19 @@ -// Example code, taken from -// https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension +// --------------------------------- +// Content script to be run on pages +// --------------------------------- -document.body.style.border = "5px solid red"; +(function() { + // Only run this script once + if (window.hasRun) { + return; + } + window.hasRun = true; + + // Search for all text areas + document.querySelectorAll("textarea").forEach(function(textarea) { + // Do something with it... + console.log(textarea); + textarea.style.border = "2px solid red"; + }); + +})();