From d62f3b59350600b6f0080c5c2c92ec7d9bc35263 Mon Sep 17 00:00:00 2001 From: DoctorDizzyspin Date: Wed, 5 Mar 2025 14:51:57 +0000 Subject: [PATCH] Update code.js fixed code, changed the way the bookmarklet works (it now replaces the text in the share textbox) --- code.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code.js b/code.js index 9d3ba06..f000792 100644 --- a/code.js +++ b/code.js @@ -4,6 +4,6 @@ javascript: (function() { string = string.replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&').replace(/

 <\/p>/g, '').replace(/'/g, "'"); string = string.replace(/(
(?=Chapters|Summary)|<\/p>

)/g, '\n\n').replace(/<\/?(i|em)>/g, '*').replace(/<\/?u>/g, '__').replace(/


/g, '\n\n---\n').replace(/([^<]*)<\/a>/g, '[$5](<$1>)').replace(/<\/?(strong|b)>/g, '**').replace(/<\/?p>/g, '').replace(/
/g, ' \n'); string = string.replace(/
(\*\*)?([^<]*)\2<\/a>/g, '$2[$3](<$1>)$2').replace(/([^<]*)<\/a>/g, '$1').replace(/\((\d* words)\) (.*\n\n)(Chapters.*\n)(Fandom:.*\nRating.*\n)/g, '$2$4$3Word Count: $1 \n'); - newString = string.replace(/^(Fandom|Rating|Chapters|Word Count|Warnings|Relationships|Characters|Additional Tags|Summary|Series):/gm, '**$1**\:'); - alert(newString) + var newString = string.replace(/^(Fandom|Rating|Chapters|Word Count|Warnings|Relationships|Characters|Additional Tags|Summary|Series):/gm, '**$1**\:'); + stringGet.innerHTML = newString })() \ No newline at end of file