ISO Userscript

Talk about Forum Mafia feedback, suggestions, etc here.

Moderators: Varanus, FM Game Moderators

Re: ISO Userscript

Postby chitownmvp01 » Wed Nov 30, 2016 5:24 pm

I got this message when trying to install the userscript on Chrome.
Spoiler: Image


Thanks Achro!: Spoiler:
Chitsticks INC.


Favorite Roles: Mayor, Jailor, Investigator, Lookout, Sheriff, Godfather, Consigliere
Least Favorite Roles: Transporter, Jester, Survivor, Disguiser, Mafioso (original, not promoted)
User avatar
chitownmvp01
[Forum Mafia XI] Winner
[Forum Mafia XI] Winner
 
Posts: 8464
Joined: Thu May 01, 2014 4:50 am
Location: Chicagoland (CST/UTC-6 or CDT/UTC-5)

Re: ISO Userscript

Postby iggyvolz » Wed Nov 30, 2016 11:05 pm

deferentsheep wrote:updated because the iso links were unnecessarily long: http://nasal.hol.es/fm-iso.user.js

Since the site's down, I mirrored it on GitHub. Also took out the Mafiascum thing and used the Google CDN for loading jQuery instead of a Pastebin - http://iggyvolz.github.io/TOS-iso-script/fm-iso.user.js
Greatest failures/shitshows:
User avatar
iggyvolz
Werewolf
Werewolf
 
Posts: 3257
Joined: Wed Mar 26, 2014 12:21 pm
Location: /dev/null

Re: ISO Userscript

Postby Kirize12 » Wed Nov 30, 2016 11:07 pm

Why is the ISO link all the way to the left instead of where it normally is?
Factional balance - understanding that whisper games are bad because they cause Town to win a disproportionate amount

Strategical balance - understanding that whisper games are bad because there's no reason to use any other strategy

Structural balance - understanding that disabling the Mayor's whispers, despite it fixing whisper games, means that a player can't use a core mechanic of the game and is still bad

This matters - educate yourself.
User avatar
Kirize12
Sponsor
Sponsor
 
Posts: 8815
Joined: Sun Oct 19, 2014 11:50 am
Location: Tony Stark in Ranked

Re: ISO Userscript

Postby iggyvolz » Wed Nov 30, 2016 11:19 pm

Kirize12 wrote:Why is the ISO link all the way to the left instead of where it normally is?

Whoops, fixed it (click the link again and it should update).
Greatest failures/shitshows:
User avatar
iggyvolz
Werewolf
Werewolf
 
Posts: 3257
Joined: Wed Mar 26, 2014 12:21 pm
Location: /dev/null

Re: ISO Userscript

Postby Kirize12 » Wed Nov 30, 2016 11:20 pm

It used to be next to the username :P (in the post of course)
Factional balance - understanding that whisper games are bad because they cause Town to win a disproportionate amount

Strategical balance - understanding that whisper games are bad because there's no reason to use any other strategy

Structural balance - understanding that disabling the Mayor's whispers, despite it fixing whisper games, means that a player can't use a core mechanic of the game and is still bad

This matters - educate yourself.
User avatar
Kirize12
Sponsor
Sponsor
 
Posts: 8815
Joined: Sun Oct 19, 2014 11:50 am
Location: Tony Stark in Ranked

Re: ISO Userscript

Postby iggyvolz » Wed Nov 30, 2016 11:21 pm

Kirize12 wrote:It used to be next to the username :P (in the post of course)

So like this?:
() Post #31 by Kirize12 (ISO) » Thu Dec 01, 2016 12:20 am


You can tell how much I've been on recently :P
Greatest failures/shitshows:
User avatar
iggyvolz
Werewolf
Werewolf
 
Posts: 3257
Joined: Wed Mar 26, 2014 12:21 pm
Location: /dev/null

Re: ISO Userscript

Postby Kirize12 » Wed Nov 30, 2016 11:24 pm

http://imgur.com/a/pKPZN

Here's a screenshot. Can't explain it well, not sure what the () means.
Factional balance - understanding that whisper games are bad because they cause Town to win a disproportionate amount

Strategical balance - understanding that whisper games are bad because there's no reason to use any other strategy

Structural balance - understanding that disabling the Mayor's whispers, despite it fixing whisper games, means that a player can't use a core mechanic of the game and is still bad

This matters - educate yourself.
User avatar
Kirize12
Sponsor
Sponsor
 
Posts: 8815
Joined: Sun Oct 19, 2014 11:50 am
Location: Tony Stark in Ranked

Re: ISO Userscript

Postby iggyvolz » Wed Nov 30, 2016 11:30 pm

Kirize12 wrote:http://imgur.com/a/pKPZN

Here's a screenshot. Can't explain it well, not sure what the () means.

So it seems the reason the thing was broken in the first place was that the "»" symbol wouldn't paste into my editor. Got that all figured out and it should be working as intended now.
Greatest failures/shitshows:
User avatar
iggyvolz
Werewolf
Werewolf
 
Posts: 3257
Joined: Wed Mar 26, 2014 12:21 pm
Location: /dev/null

Re: ISO Userscript

Postby Kirize12 » Wed Nov 30, 2016 11:39 pm

Still doesn't work, actually. ;_;
Factional balance - understanding that whisper games are bad because they cause Town to win a disproportionate amount

Strategical balance - understanding that whisper games are bad because there's no reason to use any other strategy

Structural balance - understanding that disabling the Mayor's whispers, despite it fixing whisper games, means that a player can't use a core mechanic of the game and is still bad

This matters - educate yourself.
User avatar
Kirize12
Sponsor
Sponsor
 
Posts: 8815
Joined: Sun Oct 19, 2014 11:50 am
Location: Tony Stark in Ranked

Re: ISO Userscript

Postby iggyvolz » Mon Dec 05, 2016 10:34 am

Kirize12 wrote:Still doesn't work, actually. ;_;

It's working for me... what's wrong with it?
Greatest failures/shitshows:
User avatar
iggyvolz
Werewolf
Werewolf
 
Posts: 3257
Joined: Wed Mar 26, 2014 12:21 pm
Location: /dev/null

Re: ISO Userscript

Postby TrueGent » Sat Dec 10, 2016 8:47 pm

iggyvolz wrote:
deferentsheep wrote:updated because the iso links were unnecessarily long: http://nasal.hol.es/fm-iso.user.js

Since the site's down, I mirrored it on GitHub. Also took out the Mafiascum thing and used the Google CDN for loading jQuery instead of a Pastebin - http://iggyvolz.github.io/TOS-iso-script/fm-iso.user.js

I cant seem to install this one?
User avatar
TrueGent
FM Game Moderator
FM Game Moderator
 
Posts: 1312
Joined: Wed Apr 01, 2015 9:54 am
Location: Sometimes. (GMT)

Re: ISO Userscript

Postby melanora » Sat Dec 10, 2016 10:58 pm

If you know how to add a new script, you can copy and paste these things:

Update URL:
Code: Select all
http://nasal.hol.es/fm-iso.user.js


And then in the section below that, remove everything and paste:

Code: Select all
// ==UserScript==
// @name        FM Post Numberer
// @namespace   http://blankmediagames.com
// @author      deferentsheep
// @description Numbers posts and adds ISO
// @include     http://blankmediagames.com/phpbb/*
// @include     http://www.blankmediagames.com/phpbb/*
// @include     https://blankmediagames.com/phpbb/*
// @include     https://www.blankmediagames.com/phpbb/*
// @grant      none
// @version     1.0.4
// ==/UserScript==

// --------------------
// Configurable parameters, you may change values here

// If true, runs the script in every subforum, otherwise only in those specified by desiredForums.
var allForums = true;

// List of forums to run the script on if allForums is false. Works with subforums as well (e.g. "Forum Mafia" will enable the script in "Signups", "Game Threads", etc.).
var desiredForums = ["Game Threads", "FM Discussion"];

// --------------------

function actualThing() {
   $("#site-description").children("h1").first().html("Mafiascum");
   $("#site-description").children("p").first().html("A mob has formed");

   var willRun = false;
   $(".icon-home > a").each(function(index, value) {
      var label = $(this).html();
      var i;
      for (i = 0; !willRun && i < desiredForums.length; i++) {
         if (label == desiredForums[i]) {
            willRun = true;
         }
      }
   });
   
   if (!allForums && !willRun) {
      return;
   }
   
   var threadURL = $("h2").first().children("a").first().attr("href");
   var threadNumber = "";
   var i = threadURL.search("&t=") + 3;
   while (!isNaN(threadURL[i])) {
      threadNumber += threadURL[i++];
   }
   
   var pageNumber = $(".pagination").find("strong").first().html();
   
   $(".post").each(function(index, value) {
      if ($(this).children(".inner").first().children(".postprofile").length == 0) {
         return;
      }
      
      var postID = $(this).attr("id").substring(1);
      var postNumber = (pageNumber - 1) * 25 + index + 1;
      var authorLine = $(this).find(".author");
      var authorName = authorLine.find("strong").first().children("a").html();
      var authorString = authorLine.html();
      
      var insertIndex = authorString.search("</a>by") + 4;
      authorString = authorString.substring(0, insertIndex) + " Post <a href=\"./viewtopic.php?p=" + postID + "#p" + postID + "\"><strong>#" + postNumber + "</strong></a> " + authorString.substring(insertIndex, authorString.length);
      
      insertIndex = authorString.search("»") - 1;
      authorString = authorString.substring(0, insertIndex) + " (<a href=\"./search.php?t=" + threadNumber + "&author=" + authorName + "\">ISO</a>)" + authorString.substring(insertIndex, authorString.length);
      authorLine.html(authorString);
   });
}

function loadScript(src, callback) {
   var s, r, t;
   r = false;
   s = document.createElement("script");
   s.type = "text/javascript";
   s.src = src;
   s.onload = s.onreadystatechange = function() {
      if (!r && (!this.readyState || this.readyState == "complete")) {
         r = true;
         callback();
      }
   };
   t = document.getElementsByTagName("script")[0];
   t.parentNode.insertBefore(s, t);
}

loadScript("//pastebin.com/raw/LSY6dn5Q", actualThing);



Hopefully the manual way works for everyone!
#overthrowthepatriarchy #babyforfmmod
I'm not a fucking gmod. Don't send me shit about your ban appeal.

Image

FM Record
Spoiler: Image
User avatar
melanora
Retributionist
Retributionist
 
Posts: 371
Joined: Fri Apr 24, 2015 3:44 pm
Location: EST

Re: ISO Userscript

Postby WindBlqde » Sun Dec 11, 2016 1:05 pm

It seems pretty neat.
I am a preteen fortnite tiktok kid
User avatar
WindBlqde
Mayor
Mayor
 
Posts: 825
Joined: Mon Feb 29, 2016 3:47 pm
Location: Eleanor's House

Re: ISO Userscript

Postby PersianRugs » Sun Dec 11, 2016 1:22 pm

WindBlqde wrote:It seems pretty neat.

It is! to bad it does not work on phones.

BTW where's your colored name?
Spoiler: 7D- Citizen(Dead) Lost
SFM7- Gunslinger(Replaced in)(Dead) Lost
CFM9- Doctor(Dead) Won
7R- Arsonist(Dead) Lost
7H- Citizen(Dead) Lost
SFM11- Wizard(Lived) Won
7I- Pakhan(Replaced in)(Dead) Lost
SFM12- Citizen(Dead) Lost
CFM12- Ce-Matoran(Lived) Won
SFM14- General(Dead) Lost
8D- Citizen(Dead) Won
TFM16- Mafia Mayor(Dead) Lost
Episode IX- Bodyguard(Dead) Lost
TFM20- Traitor(Lived) Won
9B- Witch(Dead) Lost
9C- Transporter(Dead) Lost
9D- Arsonist(Replaced in)(Dead) Lost
9E- Ongoing
9F- Ongoing
User avatar
PersianRugs
[Forum Mafia XI] Winner
[Forum Mafia XI] Winner
 
Posts: 315
Joined: Fri Apr 24, 2015 6:07 pm
Location: In your screen right now

Re: ISO Userscript

Postby chitownmvp01 » Sun Dec 11, 2016 1:39 pm

melanora wrote:If you know how to add a new script, you can copy and paste these things:

Update URL:
Code: Select all
http://nasal.hol.es/fm-iso.user.js


And then in the section below that, remove everything and paste:

Code: Select all
// ==UserScript==
// @name        FM Post Numberer
// @namespace   http://blankmediagames.com
// @author      deferentsheep
// @description Numbers posts and adds ISO
// @include     http://blankmediagames.com/phpbb/*
// @include     http://www.blankmediagames.com/phpbb/*
// @include     https://blankmediagames.com/phpbb/*
// @include     https://www.blankmediagames.com/phpbb/*
// @grant      none
// @version     1.0.4
// ==/UserScript==

// --------------------
// Configurable parameters, you may change values here

// If true, runs the script in every subforum, otherwise only in those specified by desiredForums.
var allForums = true;

// List of forums to run the script on if allForums is false. Works with subforums as well (e.g. "Forum Mafia" will enable the script in "Signups", "Game Threads", etc.).
var desiredForums = ["Game Threads", "FM Discussion"];

// --------------------

function actualThing() {
   $("#site-description").children("h1").first().html("Mafiascum");
   $("#site-description").children("p").first().html("A mob has formed");

   var willRun = false;
   $(".icon-home > a").each(function(index, value) {
      var label = $(this).html();
      var i;
      for (i = 0; !willRun && i < desiredForums.length; i++) {
         if (label == desiredForums[i]) {
            willRun = true;
         }
      }
   });
   
   if (!allForums && !willRun) {
      return;
   }
   
   var threadURL = $("h2").first().children("a").first().attr("href");
   var threadNumber = "";
   var i = threadURL.search("&t=") + 3;
   while (!isNaN(threadURL[i])) {
      threadNumber += threadURL[i++];
   }
   
   var pageNumber = $(".pagination").find("strong").first().html();
   
   $(".post").each(function(index, value) {
      if ($(this).children(".inner").first().children(".postprofile").length == 0) {
         return;
      }
      
      var postID = $(this).attr("id").substring(1);
      var postNumber = (pageNumber - 1) * 25 + index + 1;
      var authorLine = $(this).find(".author");
      var authorName = authorLine.find("strong").first().children("a").html();
      var authorString = authorLine.html();
      
      var insertIndex = authorString.search("</a>by") + 4;
      authorString = authorString.substring(0, insertIndex) + " Post <a href=\"./viewtopic.php?p=" + postID + "#p" + postID + "\"><strong>#" + postNumber + "</strong></a> " + authorString.substring(insertIndex, authorString.length);
      
      insertIndex = authorString.search("»") - 1;
      authorString = authorString.substring(0, insertIndex) + " (<a href=\"./search.php?t=" + threadNumber + "&author=" + authorName + "\">ISO</a>)" + authorString.substring(insertIndex, authorString.length);
      authorLine.html(authorString);
   });
}

function loadScript(src, callback) {
   var s, r, t;
   r = false;
   s = document.createElement("script");
   s.type = "text/javascript";
   s.src = src;
   s.onload = s.onreadystatechange = function() {
      if (!r && (!this.readyState || this.readyState == "complete")) {
         r = true;
         callback();
      }
   };
   t = document.getElementsByTagName("script")[0];
   t.parentNode.insertBefore(s, t);
}

loadScript("//pastebin.com/raw/LSY6dn5Q", actualThing);



Hopefully the manual way works for everyone!


I got this message after going to the URL.

I'm currently using a Chromebook.
Spoiler: Image


Thanks Achro!: Spoiler:
Chitsticks INC.


Favorite Roles: Mayor, Jailor, Investigator, Lookout, Sheriff, Godfather, Consigliere
Least Favorite Roles: Transporter, Jester, Survivor, Disguiser, Mafioso (original, not promoted)
User avatar
chitownmvp01
[Forum Mafia XI] Winner
[Forum Mafia XI] Winner
 
Posts: 8464
Joined: Thu May 01, 2014 4:50 am
Location: Chicagoland (CST/UTC-6 or CDT/UTC-5)

Re: ISO Userscript

Postby melanora » Sun Dec 11, 2016 2:06 pm

Going to the URL? Why would you go to the url? Do you know how to use tampermonkey?
#overthrowthepatriarchy #babyforfmmod
I'm not a fucking gmod. Don't send me shit about your ban appeal.

Image

FM Record
Spoiler: Image
User avatar
melanora
Retributionist
Retributionist
 
Posts: 371
Joined: Fri Apr 24, 2015 3:44 pm
Location: EST

Re: ISO Userscript

Postby chitownmvp01 » Sun Dec 11, 2016 2:08 pm

melanora wrote:Going to the URL? Why would you go to the url? Do you know how to use tampermonkey?


I've never used it before. But your post just made me figure out to do it and now it works for me! Thanks! :D
Spoiler: Image


Thanks Achro!: Spoiler:
Chitsticks INC.


Favorite Roles: Mayor, Jailor, Investigator, Lookout, Sheriff, Godfather, Consigliere
Least Favorite Roles: Transporter, Jester, Survivor, Disguiser, Mafioso (original, not promoted)
User avatar
chitownmvp01
[Forum Mafia XI] Winner
[Forum Mafia XI] Winner
 
Posts: 8464
Joined: Thu May 01, 2014 4:50 am
Location: Chicagoland (CST/UTC-6 or CDT/UTC-5)

Re: ISO Userscript

Postby iggyvolz » Sun Dec 11, 2016 3:33 pm

TrueGent wrote:
iggyvolz wrote:
deferentsheep wrote:updated because the iso links were unnecessarily long: http://nasal.hol.es/fm-iso.user.js

Since the site's down, I mirrored it on GitHub. Also took out the Mafiascum thing and used the Google CDN for loading jQuery instead of a Pastebin - http://iggyvolz.github.io/TOS-iso-script/fm-iso.user.js

I cant seem to install this one?


What about it isn't working? Is it not popping up with the TamperMonkey window or giving an error?
Greatest failures/shitshows:
User avatar
iggyvolz
Werewolf
Werewolf
 
Posts: 3257
Joined: Wed Mar 26, 2014 12:21 pm
Location: /dev/null

Re: ISO Userscript

Postby TrueGent » Sun Dec 11, 2016 3:36 pm

iggyvolz wrote:
TrueGent wrote:
iggyvolz wrote:
deferentsheep wrote:updated because the iso links were unnecessarily long: http://nasal.hol.es/fm-iso.user.js

Since the site's down, I mirrored it on GitHub. Also took out the Mafiascum thing and used the Google CDN for loading jQuery instead of a Pastebin - http://iggyvolz.github.io/TOS-iso-script/fm-iso.user.js

I cant seem to install this one?


What about it isn't working? Is it not popping up with the TamperMonkey window or giving an error?

My TM install was broken or something, I reinstalled yesterday and it worked.
User avatar
TrueGent
FM Game Moderator
FM Game Moderator
 
Posts: 1312
Joined: Wed Apr 01, 2015 9:54 am
Location: Sometimes. (GMT)

Re: ISO Userscript

Postby STAA » Thu Dec 15, 2016 10:49 am

Do you think you could add in ToS Dark support?
Hi yes, I am a furry. Deal with it.

It's funny how people's emotions and outlooks can be changed by a few kind words from a few kind souls.

FM Record:
2-6-2 (game canned)
Spoiler: Image
User avatar
STAA
Sponsor
Sponsor
 
Posts: 61
Joined: Mon Jul 13, 2015 3:32 pm
Location: Oclax (CST)

Re: ISO Userscript

Postby JazzMusicStops » Thu Dec 15, 2016 12:28 pm

STAA wrote:Do you think you could add in ToS Dark support?

use proSilver u skrub
And you may say to yourself, "My God! What have I done?"

User avatar
JazzMusicStops
Sponsor
Sponsor
 
Posts: 5453
Joined: Sun Dec 07, 2014 4:06 am
Location: Mr Johnson's Wild Ride (GMT)

Re: ISO Userscript

Postby deferentsheep » Sun Dec 18, 2016 9:21 am

STAA wrote:Do you think you could add in ToS Dark support?

See the new version here: http://yeux.esy.es/fm-iso.user.js

also:
- replaced spaces with tabs (""""beautified"""" lol)
- sleek and minimalistic function names
- made so there wasn't a space missing after one of the brackets around ISO i forget which
bound to the sky for eternity, the unbudging god is all-knowing, all-seeing
User avatar
deferentsheep
Disguiser
Disguiser
 
Posts: 1052
Joined: Sun Nov 02, 2014 8:53 pm

Re: ISO Userscript

Postby TrueGent » Tue Mar 28, 2017 9:49 am

melanora wrote:If you know how to add a new script, you can copy and paste these things:

Update URL:
Code: Select all
http://nasal.hol.es/fm-iso.user.js


And then in the section below that, remove everything and paste:

Code: Select all
// ==UserScript==
// @name        FM Post Numberer
// @namespace   http://blankmediagames.com
// @author      deferentsheep
// @description Numbers posts and adds ISO
// @include     http://blankmediagames.com/phpbb/*
// @include     http://www.blankmediagames.com/phpbb/*
// @include     https://blankmediagames.com/phpbb/*
// @include     https://www.blankmediagames.com/phpbb/*
// @grant      none
// @version     1.0.4
// ==/UserScript==

// --------------------
// Configurable parameters, you may change values here

// If true, runs the script in every subforum, otherwise only in those specified by desiredForums.
var allForums = true;

// List of forums to run the script on if allForums is false. Works with subforums as well (e.g. "Forum Mafia" will enable the script in "Signups", "Game Threads", etc.).
var desiredForums = ["Game Threads", "FM Discussion"];

// --------------------

function actualThing() {
   $("#site-description").children("h1").first().html("Mafiascum");
   $("#site-description").children("p").first().html("A mob has formed");

   var willRun = false;
   $(".icon-home > a").each(function(index, value) {
      var label = $(this).html();
      var i;
      for (i = 0; !willRun && i < desiredForums.length; i++) {
         if (label == desiredForums[i]) {
            willRun = true;
         }
      }
   });
   
   if (!allForums && !willRun) {
      return;
   }
   
   var threadURL = $("h2").first().children("a").first().attr("href");
   var threadNumber = "";
   var i = threadURL.search("&t=") + 3;
   while (!isNaN(threadURL[i])) {
      threadNumber += threadURL[i++];
   }
   
   var pageNumber = $(".pagination").find("strong").first().html();
   
   $(".post").each(function(index, value) {
      if ($(this).children(".inner").first().children(".postprofile").length == 0) {
         return;
      }
      
      var postID = $(this).attr("id").substring(1);
      var postNumber = (pageNumber - 1) * 25 + index + 1;
      var authorLine = $(this).find(".author");
      var authorName = authorLine.find("strong").first().children("a").html();
      var authorString = authorLine.html();
      
      var insertIndex = authorString.search("</a>by") + 4;
      authorString = authorString.substring(0, insertIndex) + " Post <a href=\"./viewtopic.php?p=" + postID + "#p" + postID + "\"><strong>#" + postNumber + "</strong></a> " + authorString.substring(insertIndex, authorString.length);
      
      insertIndex = authorString.search("»") - 1;
      authorString = authorString.substring(0, insertIndex) + " (<a href=\"./search.php?t=" + threadNumber + "&author=" + authorName + "\">ISO</a>)" + authorString.substring(insertIndex, authorString.length);
      authorLine.html(authorString);
   });
}

function loadScript(src, callback) {
   var s, r, t;
   r = false;
   s = document.createElement("script");
   s.type = "text/javascript";
   s.src = src;
   s.onload = s.onreadystatechange = function() {
      if (!r && (!this.readyState || this.readyState == "complete")) {
         r = true;
         callback();
      }
   };
   t = document.getElementsByTagName("script")[0];
   t.parentNode.insertBefore(s, t);
}

loadScript("//pastebin.com/raw/LSY6dn5Q", actualThing);



Hopefully the manual way works for everyone!

This code didn't work when I tried to reinstall it, but I fiddled a bit and got it working again
Code: Select all
// ==UserScript==
// @name        FM Post Numberer
// @namespace   http://blankmediagames.com
// @author      deferentsheep
// @description Numbers posts and adds ISO
// @include     http://blankmediagames.com/phpbb/*
// @include     http://www.blankmediagames.com/phpbb/*
// @include     https://blankmediagames.com/phpbb/*
// @include     https://www.blankmediagames.com/phpbb/*
// @grant      none
// @version     1.0.4
// ==/UserScript==

// --------------------
// Configurable parameters, you may change values here

// If true, runs the script in every subforum, otherwise only in those specified by desiredForums.
var allForums = true;

// List of forums to run the script on if allForums is false. Works with subforums as well (e.g. "Forum Mafia" will enable the script in "Signups", "Game Threads", etc.).
var desiredForums = ["Game Threads", "FM Discussion"];

// --------------------

function actualThing() {
   $("#site-description").children("h1").first().html("Mafiascum");
   $("#site-description").children("p").first().html("A mob has formed");

   var willRun = false;
   $(".icon-home > a").each(function(index, value) {
      var label = $(this).html();
      var i;
      for (i = 0; !willRun && i < desiredForums.length; i++) {
         if (label == desiredForums[i]) {
            willRun = true;
         }
      }
   });

   if (!allForums && !willRun) {
      return;
   }

   var threadURL = $("h2").first().children("a").first().attr("href");
   var threadNumber = "";
   var i = threadURL.search("&t=") + 3;
   while (!isNaN(threadURL[i])) {
      threadNumber += threadURL[i++];
   }

   var pageNumber = $(".pagination").find("strong").first().html();

   $(".post").each(function(index, value) {
      if ($(this).children(".inner").first().children(".postprofile").length === 0) {
         return;
      }
      var postID = $(this).attr("id").substring(1);
      var postNumber = (pageNumber - 1) * 25 + index + 1;
      var authorLine = $(this).find(".author");
      var authorName = authorLine.find("strong").first().children("a").html();
      var authorString = authorLine.html();

      var insertIndex = authorString.search("</a>by") + 4;
      authorString = authorString.substring(0, insertIndex) + " Post <a href=\"./viewtopic.php?p=" + postID + "#p" + postID + "\"><strong>#" + postNumber + "</strong></a> " + authorString.substring(insertIndex, authorString.length);

      insertIndex = authorString.search("»") - 1;
      authorString = authorString.substring(0, insertIndex) + " (<a href=\"./search.php?t=" + threadNumber + "&author=" + authorName + "\">ISO</a>)" + authorString.substring(insertIndex, authorString.length);
      authorLine.html(authorString);
   });
}

function loadScript(src, callback) {
   var s, r, t;
   r = false;
   s = document.createElement("script");
   s.type = "text/javascript";
   s.src = src;
   s.onload = s.onreadystatechange = function() {
      if (!r && (!this.readyState || this.readyState == "complete")) {
         r = true;
         callback();
      }
   };
   t = document.getElementsByTagName("script")[0];
   t.parentNode.insertBefore(s, t);
}

loadScript("//pastebin.com/raw/LSY6dn5Q", actualThing);

Just in case anyone wants to install it after this bump
User avatar
TrueGent
FM Game Moderator
FM Game Moderator
 
Posts: 1312
Joined: Wed Apr 01, 2015 9:54 am
Location: Sometimes. (GMT)

Re: ISO Userscript

Postby Exacerbated » Sat Jan 27, 2018 7:10 pm

Does this not work for firefox anymore? Can't get it to work.
Image Hog Out Or Log Out Image
User avatar
Exacerbated
Disguiser
Disguiser
 
Posts: 1038
Joined: Thu Oct 09, 2014 12:15 am
Location: Chicago, Illinois (UTC -6:00)

Re: ISO Userscript

Postby iggyvolz » Sun Jan 28, 2018 1:03 am

Exacerbated wrote:Does this not work for firefox anymore? Can't get it to work.

I actually just tried this the other day and it didn't work. Copying the javascript into the console makes it work though, so I'm guessing it's an issue either with Greasemonkey or with how it's loaded.
Greatest failures/shitshows:
User avatar
iggyvolz
Werewolf
Werewolf
 
Posts: 3257
Joined: Wed Mar 26, 2014 12:21 pm
Location: /dev/null

PreviousNext

Return to FM Discussion

Who is online

Users browsing this forum: Rickdaily12 and 2 guests