// ==UserScript== // @name Price Converter with Tax for Specific Websites // @namespace http://tampermonkey.net/ // @version 0.5 // @description Convert price tags on websites // @author Nears // @match *://*.newegg.ca/* // @match *://*.canadacomputers.com/* // @grant none // @license MIT // @downloadURL none // ==/UserScript== (function() { 'use strict'; // Define the tax rate const TAX_RATE = 0.14975; // Add CSS block const css = ` .tax-included { color: red; font-size: 0.8em; } .base-price { color: #666; font-size: 0.8em; text-decoration: line-through; } `; const styleElement = document.createElement('style'); styleElement.textContent = css; document.head.appendChild(styleElement); // Define the websites and their price tag selectors const websites = [ { domain: 'newegg.ca', selectors: ['li.price-current', '.goods-price-current'], updatePrice: (element) => { const strongElement = element.querySelector('strong'); const supElement = element.querySelector('sup'); if (strongElement && supElement) { const price = parseFloat(`${strongElement.textContent.replace(',', '')}${supElement.textContent}`); const convertedPrice = convertPrice(price); element.innerHTML = `