// SZ 2025-11-30 — override SMF expandPages for "..." pagination function expandPages(spanEl, base_link, first_page, last_page, per_page) { try { var per = parseInt(per_page, 10) || 1; // Try to derive the real maximum page count by inspecting the pagination links. var maxPage = 1; var container = spanEl && spanEl.closest ? spanEl.closest(".pagelinks") : null; if (container) { var links = container.querySelectorAll("a.nav_page"); var maxStart = 0; links.forEach(function (a) { var href = a.getAttribute("href") || ""; // Match the last . segment, e.g. topic=15206.7650 var m = href.match(/\.([0-9]+)(?:$|[^0-9])/); if (m) { var n = parseInt(m[1], 10); if (!isNaN(n) && n > maxStart) maxStart = n; } }); if (maxStart > 0) maxPage = Math.floor(maxStart / per) + 1; } // Fallback to SMF-provided last_page if DOM inspection failed. if (!maxPage || maxPage < 1) { var last = parseInt(last_page, 10); maxPage = Math.floor(last / per) + 1; if (!maxPage || maxPage < 1) maxPage = 1; } var input = prompt("Go to page (1-" + maxPage + "):"); if (input === null) return; var page = parseInt(input, 10); if (!page || page < 1 || page > maxPage) return; var start = (page - 1) * per; if (start < 0) start = 0; var url = base_link; // base_link may be an HTML string contain an tag; try to extract href try { var tmp = document.createElement("div"); tmp.innerHTML = base_link; var a = tmp.querySelector("a"); if (a && a.getAttribute("href")) { url = a.getAttribute("href"); } } catch (err) { url = base_link; } // Replace common SMF patterns with the computed offset if (url.indexOf("%1$d") !== -1) { url = url.replace("%1$d", start); } else if (url.indexOf(";start=") !== -1) { url = url.replace(/;start=\d+/, ";start=" + start); } else if (/\.0(?!\d)/.test(url)) { url = url.replace(/\.0(?!\d)/, "." + start); } window.location.href = url; } catch (e) { // fail silently } }

JKID

Started by Dracoslythe, Aug 15, 2009 02:46 PM

Previous topic - Next topic

1 Guest

JetTheHawk

Quote from: jkid101094 on Aug 15, 2009 03:00 PM
Ahhh! Help me Estelle! Oh wait...she isn't real....ahhhhh! :D
*takes draco hostage* OWNED
Signature
NO SIGNATURE

jkid101094

Quote from: JetTheHawk on Aug 15, 2009 03:01 PM
*takes draco hostage* OWNED
So i'm Draco's hostage who is Jet's hostage? Aww...i'm the lowest one. :D
Signature


Quote from: DracoDraco:  Saber was my bitch LONG before you heard about her.  I introduced you to FSN, loser.  D<
Oh, and still...
ILU JKIDDD

Says you. She likes me more. D<
And ILU2. o3o
IaFNSW.

JetTheHawk

Quote from: jkid101094 on Aug 15, 2009 03:02 PM
So i'm Draco's hostage who is Jet's hostage? Aww...i'm the lowest one. :D
lol
Signature
NO SIGNATURE

jkid101094

Quote from: Dracoslythe on Aug 15, 2009 02:46 PM
I WANT YOU....r


























MOO COWS.

I wish I could have seen every guy's face on SZ when they read that first line. XD
Signature


Quote from: DracoDraco:  Saber was my bitch LONG before you heard about her.  I introduced you to FSN, loser.  D<
Oh, and still...
ILU JKIDDD

Says you. She likes me more. D<
And ILU2. o3o
IaFNSW.

Elija2

Quote from: jkid101094 on Aug 15, 2009 03:44 PM
I wish I could have seen every guy's face on SZ when they read that first line. XD

Dracoslythe

Quote from: jkid101094 on Aug 15, 2009 03:44 PM
I wish I could have seen every guy's face on SZ when they read that first line. XD
lol that was the intention.  ;]
Signature



jkid101094

Quote from: Elija2 on Aug 15, 2009 03:45 PM

You know damn well if she'd taken out the "r" and "Moo Cows" you'd be like:


:o
Signature


Quote from: DracoDraco:  Saber was my bitch LONG before you heard about her.  I introduced you to FSN, loser.  D<
Oh, and still...
ILU JKIDDD

Says you. She likes me more. D<
And ILU2. o3o
IaFNSW.

Dracoslythe

I think everyone would lol

*coughyoumeanlikeitsaysnow?cough*
Signature



jkid101094

Quote from: Dracoslythe on Aug 15, 2009 03:50 PM
I think everyone would lol
Yes they would....then Meph would buy some plane tickets, fly out to Chicago, and kick my A**. XD
Signature


Quote from: DracoDraco:  Saber was my bitch LONG before you heard about her.  I introduced you to FSN, loser.  D<
Oh, and still...
ILU JKIDDD

Says you. She likes me more. D<
And ILU2. o3o
IaFNSW.

Dracoslythe

Quote from: jkid101094 on Aug 15, 2009 03:52 PM
Yes they would....then Meph would buy some plane tickets, fly out to Chicago, and kick my A**. XD
xD
naaaah.
Signature



Hakudamashi

Quote from: jkid101094 on Aug 15, 2009 03:44 PM
I wish I could have seen every guy's face on SZ when they read that first line. XD
I was neutral and said*oh gawd what now*

I've lost the ability to take this woman seriously
Signature
OR ELSE!
Compliments to our Goddess for this piece of superspecialawesome!
DO NOTCLICK!
m'kay

Dracoslythe

Quote from: Windlessusher on Aug 15, 2009 06:11 PM
I was neutral and said*oh gawd what now*

I've lost the ability to take this woman seriously
lol
but what if I needed to be serious?
Signature



jkid101094

Quote from: Dracoslythe on Aug 15, 2009 06:13 PM
lol
but what if I needed to be serious?
If you were serious i'd probably die of shock. lol
Signature


Quote from: DracoDraco:  Saber was my bitch LONG before you heard about her.  I introduced you to FSN, loser.  D<
Oh, and still...
ILU JKIDDD

Says you. She likes me more. D<
And ILU2. o3o
IaFNSW.

Dracoslythe

Signature



Hakudamashi

Quote from: Dracoslythe on Aug 15, 2009 06:13 PM
lol
but what if I needed to be serious?
then I'd avoid you for a few minutes,or maybe try to take you seriously
thank god you don't do it often ^_^
Signature
OR ELSE!
Compliments to our Goddess for this piece of superspecialawesome!
DO NOTCLICK!
m'kay