From 9dd7a57a289f9c8ac444ff724c0df154be8f2e91 Mon Sep 17 00:00:00 2001 From: JoshyPHP Date: Wed, 13 Mar 2024 17:39:45 +0100 Subject: [PATCH] Updated XenForo iframe --- iframe/2/xenforo.html | 15 ++++++++------- iframe/2/xenforo.min.html | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/iframe/2/xenforo.html b/iframe/2/xenforo.html index b01faa7e..a9c828d0 100644 --- a/iframe/2/xenforo.html +++ b/iframe/2/xenforo.html @@ -5,11 +5,12 @@ ((document) => { const contentTypes = [ - ['post', /^#(https:\/\/[-.\/\w]+?\/)threads\/\d+\/post-(\d+)/ ], - ['profile_post', /^#(https:\/\/[-.\/\w]+?\/)profile-posts\/(\d+)/ ], - ['resource', /^#(https:\/\/[-.\/\w]+?\/)resources\/(\d+)/ ], - ['thread', /^#(https:\/\/[-.\/\w]+?\/)threads\/(?:[-\w]+\.)?(\d+)/], - ['xfmg_album', /^#(https:\/\/[-.\/\w]+?\/)media\/albums\/(\d+)/ ] + ['post-', /^#(https:\/\/[-.\/\w]+?\/)threads\/\d+\/post-(\d+)/ ], + ['profile_post-', /^#(https:\/\/[-.\/\w]+?\/)profile-posts\/(\d+)/ ], + ['resource-', /^#(https:\/\/[-.\/\w]+?\/)resources\/(\d+)/ ], + ['thread-', /^#(https:\/\/[-.\/\w]+?\/)threads\/(?:[-\w]+\.)?(\d+)/ ], + ['xfmg_album-', /^#(https:\/\/[-.\/\w]+?\/)media\/albums\/(\d+)/ ], + ['', /^#(https:\/\/[-.\/\w]+?\/)embed\.php\?content=([-\w]+)/] ]; const iframe = /** @type {!HTMLIFrameElement} */ (document.createElement('iframe')); @@ -31,12 +32,12 @@ { port = e.ports[0]; - for (const [type, regexp] of contentTypes) + for (const [prefix, regexp] of contentTypes) { const m = regexp.exec(location.hash); if (m) { - iframe.src = m[1] + 'embed.php?content=' + type + '-' + m[2]; + iframe.src = m[1] + 'embed.php?content=' + prefix + m[2]; document.body.appendChild(iframe); return; diff --git a/iframe/2/xenforo.min.html b/iframe/2/xenforo.min.html index 214c71a6..f6bd1c1b 100644 --- a/iframe/2/xenforo.min.html +++ b/iframe/2/xenforo.min.html @@ -1 +1 @@ -Content from XenForo \ No newline at end of file +Content from XenForo \ No newline at end of file