(.+?)<\/blockquote>/g, '[quote=$2|$1]$3[/quote]'); albumDescJSON = albumDescJSON.replace(/(.+?)<\/strong> wrote:(.+?)<\/blockquote>/g, '[quote=$1]$2[/quote]'); albumDescJSON = albumDescJSON.replace(/(.+?)<\/blockquote>/g, '[quote]$1[/quote]'); albumDescJSON = albumDescJSON.replace(/(.+?)<\/strong>: Show<\/a>(.+?)<\/blockquote>/g, '[hide=$1]$2[/hide]'); albumDescJSON = albumDescJSON.replace(/Hidden text<\/strong>: Show<\/a>(.+?)<\/blockquote>/g, '[hide]$1[/hide]'); albumDescJSON = albumDescJSON.replace(/(.+?)<\/strong>/g, '[important]$1[/important]'); albumDescJSON = albumDescJSON.replace(/<(pre|code)>(.+?)<\/\1>/g, '[$1]$2[/$1]'); albumDescJSON = albumDescJSON.replace(/<(\/)?strong>/g, '[$1b]'); albumDesc.value = albumDescJSON; document.querySelector('input.button_preview_0').click(); } else { alert('No album description is included in the JSON!'); } var relDesc = document.getElementById('release_desc'); var relDescJSON = releaseJSON.response.torrent.description; var groupIDJSON = releaseJSON.response.group.id; var torrentIDJSON = releaseJSON.response.torrent.id; relDescJSON += (relDescJSON ? '\n\n' : '') + 'Cross-posted from ' + sourceWebsite + ': https://'; relDescJSON += sourceWebsiteDomains[sourceWebsiteIndex] + '/torrents.php?id=' + groupIDJSON + '&torrentid=' + torrentIDJSON; sourceWebsiteDomains = ['redacted.ch', 'orpheus.network']; relDesc.value = relDescJSON; document.querySelector('input.button_preview_1').click(); break; case 1: break; case 2: break; case 3: break; case 4: break; case 5: break; case 6: break; default: } } reader.onerror = function (evt) { alert('There was an error reading the file.'); } } } else { alert('No JSON file has been chosen!'); } }); })();