
This is an Auto Link Injector Script for SEO & Backlinks (a small JavaScript program that runs in your browser).
Its job: automatically insert an <a>
(text link) into the footer (or any element you choose) on selected websites/domains.
Features:
Domain-specific – only runs on domains you set in the
@match
lines.
Example:
// @match *://*.example.com/*
// @match *://example.com/*
→ Will only run on example.com
.
Automatic footer injection – by default, it inserts the link into the
<footer>
element.Customizable link – you set the link text, URL, and whether it opens in a new tab:
linkText: 'Visit Our Partner',
linkHref: 'https://your-target-domain.com',
linkTarget: '_blank',
Flexible placement –
insertPosition
can be:"append"
→ add inside footer at the end (default)"prepend"
→ at the beginning of footer"before"
→ before the footer element"after"
→ after the footer element"replace"
→ replace the footer with just the link
Orange styling – automatically applies a CSS class (
tm-orange-link
) with orange color and hover effect.Resilient – if the page reloads content dynamically (like in single-page apps), it re-adds the link if it disappears.
🛠️ How to Use It
Step 1: Install Tampermonkey
Chrome: Tampermonkey extension
Firefox: Tampermonkey add-on
Step 2: Create New Script
Click on the Tampermonkey icon → Dashboard → + Create a new script.
Paste the full script you provided.
Step 3: Edit Settings
Inside the script, adjust this block:
const settings = {
insertSelector: 'footer', // where to insert link
insertPosition: 'append', // append/prepend/replace/etc
linkText: 'Visit Our Partner',
linkHref: 'https://your-target-domain.com',
linkTarget: '_blank',
addCss: true,
cssClass: 'tm-orange-link'
};
Change
linkText
→ what the link shows.Change
linkHref
→ the site the link points to.Change
insertSelector
if you want to place the link somewhere else (e.g.,#colophon
,.site-footer
).
Step 4: Update @match
At the top of the script:
// @match *://*.example.com/*
// @match *://example.com/*
Change example.com
→ to the domains where you want the script to run (e.g., ampipaint.com
).
Step 5: Save & Enable
Press Ctrl+S (save) in Tampermonkey editor.
Make sure the script is enabled.
Visit the target site → you’ll see your link injected in the footer automatically.