blobermayne2

“Slightly Wrong” — a subtle reality-bending extension

It makes small, believable changes to webpages so things feel off without being obvious.

Examples

Prices shift a bit ($19.99 → $20.13) Headlines get toned down or reworded Video titles change slightly (“Top 10 Facts” → “About 9 Facts”) Like/view counts adjust by a small percentage

Behavior

Changes are infrequent and inconsistent Only some elements are affected each visit You can limit it to specific sites

Settings

Intensity (rare vs frequent changes) Type of edits (text, numbers, layout) “Reset reality” button to turn everything back to normal instantly

Optional additions

Occasionally nudge a button or shift spacing by a few pixels Insert a line like “You’ve seen this before” on random content Slightly alter timestamps (“2 days ago” → “3 days ago”)

The idea works because nothing is obviously broken—it just creates small inconsistencies that add up over time.

Kodari AI
KodariApr 30 at 12:35 am 9,788 (v2)

I’ll create a reality-bending browser extension that makes subtle, unsettling changes to webpages.

SlightlyWrong
A Chrome extension that subtly alters webpage content to create an unsettling sense of unreality. Makes small, believable changes like adjusting prices by a few cents, rewording headlines, shifting view counts, and nudging element positions. Changes are infrequent and inconsistent—only some elements are affected each visit. Includes intensity controls, edit type filters, and a "Reset Reality" button to restore normal browsing instantly. Perfect for creating subtle digital déjà vu.

Extension complete! “Slightly Wrong” will create subtle reality distortions across webpages.

Key features implemented:

  • Toggle distortion on/off with visual badge indicator

  • Intensity slider controls how frequently changes occur

  • Six distortion types: prices, headlines, numbers, layout, timestamps, and meta comments

  • “Reset Reality” button reloads all tabs to restore normal browsing

  • Smart detection prevents double-processing and skips critical UI elements

  • Changes persist only during the browsing session

How to use:

  1. Download as ZIP and extract

  2. Open chrome://extensions/ in Chrome

  3. Enable “Developer mode” (top right)

  4. Click “Load unpacked” → select the extension folder

  5. Click the extension icon to configure distortions

  6. Visit any website and watch reality bend slightly

Note: The extension cannot run on chrome:// pages (extension settings, new tab, etc.) - this is a Chrome security restriction. Test it on regular websites like YouTube, news sites, or shopping pages for the best effect!

Kodari can make mistakes. Review important code before using.
Files
background.js
content.js
manifest.json
popup.css
popup.html
popup.js
Code
6 749
content.js
// Tracking distorted elements to avoid double-processing
const DISTORTED_ATTR = 'data-slightly-wrong';
let settings = null;
let isProcessing = false;

// Initialize
init();

async function init() {
  settings = await chrome.storage.local.get({
    enabled: false,
    intensity: 30,
    editPrices: true,
    editHeadlines: true,
    editNumbers: true,
    editLayout: false,
    editTimestamps: false,
    editMeta: false
  });

  if (!settings.enabled) return;

  // Process existing content
  processPage();

  // Watch for dynamic content
  const observer = new MutationObserver((mutations) => {
    if (!isProcessing) {
      isProcessing = true;
      setTimeout(() => {
        processPage();
        isProcessing = false;
      }, 500);
    }
  });

  observer.observe(document.body, {
    childList: true,
    subtree: true
  });
}

function processPage() {
  if (!settings.enabled) return;

  const elements = document.querySelectorAll('body *:not(script):not(style):not([' + DISTORTED_ATTR + '])');
  
  elements.forEach(element => {
    // Skip if already processed
    if (element.hasAttribute(DISTORTED_ATTR)) return;
    
    // Skip input fields and critical UI
    if (element.tagName === 'INPUT' || element.tagName === 'TEXTAREA' || element.tagName === 'SELECT') return;
    
    // Probability check based on intensity
    const roll = Math.random() * 100;
    if (roll > settings.intensity) return;

    // Try different distortions
    if (settings.editPrices && tryDistortPrice(element)) return;
    if (settings.editNumbers && tryDistortNumber(element)) return;
    if (settings.editHeadlines && tryDistortHeadline(element)) return;
    if (settings.editTimestamps && tryDistortTimestamp(element)) return;
    if (settings.editLayout && tryDistortLayout(element)) return;
    if (settings.editMeta && tryInsertMeta(element)) return;
  });
}

function tryDistortPrice(element) {
  if (!element.textContent) return false;
  
  const text = element.textContent.trim();
  
  // Match currency patterns: $19.99, €24.50, £12.00, 29,99€
  const priceRegex = /^[\$€£¥]?\s*[\d,]+\.?\d{0,2}\s*[\$€£¥]?$/;
  
  if (!priceRegex.test(text)) return false;
  if (text.length > 20) return false; // Avoid long strings
  
  // Extract number
  const numMatch = text.match(/[\d,]+\.?\d{0,2}/);
  if (!numMatch) return false;
  
  const numStr = numMatch[0].replace(/,/g, '');
  const num = parseFloat(numStr);
  
  if (isNaN(num) || num === 0) return false;
  
  // Adjust by ±3% to ±15%
  const change = (Math.random() * 0.12 + 0.03) * (Math.random() > 0.5 ? 1 : -1);
  const newNum = num * (1 + change);
  
  // Format with 2 decimals
  const newNumStr = newNum.toFixed(2);
  const newText = text.replace(/[\d,]+\.?\d{0,2}/, newNumStr);
  
  element.textContent = newText;
  element.setAttribute(DISTORTED_ATTR, 'price');
  return true;
}

function tryDistortNumber(element) {
  if (!element.textContent) return false;
  
  const text = element.textContent.trim();
  
  // Match standalone numbers with optional suffixes: 1.2K, 45M, 234,567
  const numberRegex = /^\d{1,3}(,?\d{3})*(\.\d+)?[KMB]?\s*(views?|likes?|subscribers?|followers?|comments?)?$/i;
  
  if (!numberRegex.test(text)) return false;
  if (text.length > 25) return false;
  
  // Extract the number
  const numMatch = text.match(/^[\d,\.]+[KMB]?/i);
  if (!numMatch) return false;
  
  const numStr = numMatch[0];
  let num = parseFloat(numStr.replace(/,/g, ''));
  let suffix = '';
  
  // Handle K/M/B suffixes
  if (numStr.includes('K')) {
    num *= 1000;
    suffix = 'K';
  } else if (numStr.includes('M')) {
    num *= 1000000;
    suffix = 'M';
  } else if (numStr.includes('B')) {
    num *= 1000000000;
    suffix = 'B';
  }
  
  if (isNaN(num) || num === 0) return false;
  
  // Adjust by ±5% to ±20%
  const change = (Math.random() * 0.15 + 0.05) * (Math.random() > 0.5 ? 1 : -1);
  let newNum = Math.round(num * (1 + change));
  
  // Format with suffix
  let formattedNum;
  if (suffix === 'K') {
    formattedNum = (newNum / 1000).toFixed(1) + 'K';
  } else if (suffix === 'M') {
    formattedNum = (newNum / 1000000).toFixed(1) + 'M';
  } else if (suffix === 'B') {
    formattedNum = (newNum / 1000000000).toFixed(1) + 'B';
  } else if (newNum >= 1000) {
    formattedNum = newNum.toLocaleString();
  } else {
    formattedNum = newNum.toString();
  }
  
  const newText = text.replace(/^[\d,\.]+[KMB]?/i, formattedNum);
  
  element.textContent = newText;
  element.setAttribute(DISTORTED_ATTR, 'number');
  return true;
}

function tryDistortHeadline(element) {
  // Only target headline tags and article titles
  if (!['H1', 'H2', 'H3'].includes(element.tagName)) return false;
  if (!element.textContent) return false;
  
  const text = element.textContent.trim();
  
  // Skip if too short or too long
  if (text.length < 15 || text.length > 150) return false;
  
  // Skip if contains only uppercase (likely a logo)
  if (text === text.toUpperCase()) return false;
  
  // Apply random distortion
  const distortions = [
    () => distortWithQualifier(text),
    () => distortWithNumber(text),
    () => distortWithSubstitution(text)
  ];
  
  const distortion = distortions[Math.floor(Math.random() * distortions.length)];
  const newText = distortion();
  
  if (newText && newText !== text) {
    element.textContent = newText;
    element.setAttribute(DISTORTED_ATTR, 'headline');
    return true;
  }
  
  return false;
}

function distortWithQualifier(text) {
  const qualifiers = ['Almost', 'Nearly', 'About', 'Roughly', 'Approximately', 'Sort of'];
  const removalWords = ['Top', 'Best', 'Amazing', 'Incredible', 'Ultimate'];
  
  // 50% chance to add qualifier, 50% to remove word
  if (Math.random() > 0.5) {
    // Add qualifier at the start
    const qualifier = qualifiers[Math.floor(Math.random() * qualifiers.length)];
    return qualifier + ' ' + text;