Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Flipperwaldt
Nov 11, 2011

Won't somebody think of the starving hamsters in China?



astral posted:


:siren: v1.99.140612:siren:


  • "Add Coloring/Note" button bugfix.
---


At first, that was the only way I could reproduce it, but then I discovered what was causing it. Thanks again for catching this problem!
That totally works, yay!

There's still the weird thing that the autoselected user doesn't show up in the list as selected (no blue selection bar, nothing) and selecting another user manually does. Reselecting the autoselected user returns to no visual indication in the list. But that doesn't impede functionality for me.

Thanks man.

Adbot
ADBOT LOVES YOU

Flipperwaldt
Nov 11, 2011

Won't somebody think of the starving hamsters in China?



I'm really starting to feel like a dick for whining about something, cheering when it's supposedly fixed and then discovering in real use that I only tested really really superficially.

But I just wanted to edit an existing user of special interest by clicking the add coloring/note button. The user was autoselected, ie. right column gives me name, color and note and I can edit/update that stuff, but the new information doesn't stick. So when I close the configuration window and reload the forums page, nothing has changed. Thus reflected when re-opening the configuration dialog; it shows the old comments still. So now I have to find the user in the list manually, click another one, click the user again and edit/update to have the changes actually saved. Really don't know if I just missed that while testing or if that changed over the last couple of days somehow.

Can't blame you if you guys are getting like eh, deal with it by now.

For what it's worth, everything else still works great and I love it :shobon:

astral
Apr 26, 2004

Flipperwaldt posted:

I'm really starting to feel like a dick for whining about something, cheering when it's supposedly fixed and then discovering in real use that I only tested really really superficially.

But I just wanted to edit an existing user of special interest by clicking the add coloring/note button. The user was autoselected, ie. right column gives me name, color and note and I can edit/update that stuff, but the new information doesn't stick. So when I close the configuration window and reload the forums page, nothing has changed. Thus reflected when re-opening the configuration dialog; it shows the old comments still. So now I have to find the user in the list manually, click another one, click the user again and edit/update to have the changes actually saved. Really don't know if I just missed that while testing or if that changed over the last couple of days somehow.

Can't blame you if you guys are getting like eh, deal with it by now.

For what it's worth, everything else still works great and I love it :shobon:

Are you clicking "Update Note" before "OK" / closing the SALR preference dialog box?

Flipperwaldt
Nov 11, 2011

Won't somebody think of the starving hamsters in China?



astral posted:

Are you clicking "Update Note" before "OK" / closing the SALR preference dialog box?
Yes, definitely. Went back twice to check that. Colors don't save after autoselect either, btw, and they never needed the update button.

astral
Apr 26, 2004

Flipperwaldt posted:

Yes, definitely. Went back twice to check that. Colors don't save after autoselect either, btw, and they never needed the update button.

Edit: I was briefly able to reproduce this issue, but then it started working again. Back to testing.

astral fucked around with this message at 21:19 on Jun 18, 2014

astral
Apr 26, 2004

Flipperwaldt posted:

Yes, definitely. Went back twice to check that. Colors don't save after autoselect either, btw, and they never needed the update button.

Would you please test if this build fixes the issue? I think I've identified the root cause. :)

Flipperwaldt
Nov 11, 2011

Won't somebody think of the starving hamsters in China?



astral posted:

Would you please test if this build fixes the issue? I think I've identified the root cause. :)
So far so good, this does what I expect it to :)

There's not much I can do for you, but I have an avatar certificate lying around. Would that be of any use to you?

astral
Apr 26, 2004

Flipperwaldt posted:

So far so good, this does what I expect it to :)

There's not much I can do for you, but I have an avatar certificate lying around. Would that be of any use to you?

I'm pretty happy with mine, but thanks for the offer anyway!

Flipperwaldt
Nov 11, 2011

Won't somebody think of the starving hamsters in China?



Hi guys :neckbeard:



Weirdest thing; an Unknown user with userID 0 was created spontaneously. The text in the note is what I used during testing for another user and then reverted (but apparently was still remembered somehow for use in this thing). The background color is the text color from another, completely unrelated user.

As you can see, this colors fabricated quotes that don't refer to an actual userID.

This happened in the previous version too (with different text and the neutral color scheme), but I ascribed it to user error somehow.

Again sorry for all the :spergin: about this.

astral
Apr 26, 2004

Flipperwaldt posted:

Hi guys :neckbeard:



Weirdest thing; an Unknown user with userID 0 was created spontaneously. The text in the note is what I used during testing for another user and then reverted (but apparently was still remembered somehow for use in this thing). The background color is the text color from another, completely unrelated user.

As you can see, this colors fabricated quotes that don't refer to an actual userID.

This happened in the previous version too (with different text and the neutral color scheme), but I ascribed it to user error somehow.

Again sorry for all the :spergin: about this.

There's a chance this might've been caused by an old bug (if you delete it now, it might stay gone), but I'll make sure it doesn't (and can't) happen again for the next build. Thanks again for finding these bugs!

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer
Where would y'all suggest reading up to learn more about extension development? I have an add-on I want to make for SA but Mozilla's documentation kind of sucks. I only need to do a few things and SALR does them all. I tried reading the code but it's massive and full of hacks to work around issues for full versions. I only need to do the following:
*When in a thread, add an extra button/link to each post beneath the custom tile
*When that button is clicked, stow the threadID and postID in a file somewhere.

I'm basically making a bookmark pane just for reading huge megathreads. The idea is basically that you can click the button to "bookmark" a particular post as you go, but also start reading from the end so you can keep up with current discussion with the normal last read post functions.

There'll also be a toolbar button you can click to open a pane with links to all your bookmarked posts. You can basically use this extension to catch up on huge threads while also participating in the current discussions.

I'm aware I could always just bookmark the "link to this post" link, but I want to code this up both because it's slightly more elegant and to learn about extension programming for fun.

While I'm not a stranger to programming, I'm super unfamiliar with Javascript and Mozilla's terrible documentation doesn't help.

minato
Jun 7, 2004

cutty cain't hang, say 7-up.
Taco Defender
You could just make a Greasemonkey script. Here's the source to the SA++ Greasemonkey code I wrote (I'd link to userscripts.org but it's been down for a while).
http://pastebin.com/TEccGZU3
It's got functions to do most of what you ask already (i.e. it can stick buttons on the page, it parses the thread / post IDs, etc). The code layout is a bit crap, but that's mostly because GreaseMonkey doesn't easily let me split the code up into separate files.

AFAIK you can't use the APIs to write to files directly, but you can use the localStorage APIs to stick it in a database. See how it stores its preferences.

Peanut and the Gang
Aug 24, 2009

by exmarx
Please make WebM links show the video inline, forums heroes.

LiquidRain
May 21, 2007

Watch the madness!

Doing that creates a lot of CPU usage if there's a lot of stacked WebMs. Click-to-play would be a better solution. :)

hooah
Feb 6, 2006
WTF?
What's the best way to add an "open all unread" button to the bookmarks page? I've been using Chrome for a while, but the way it sometimes doesn't play video, or maybe doesn't play the sound for a video is starting to get to me. Before I switched away from FF, I used to have something that added that button. It might have been a Greasemonkey script, but since userscripts.org is down, I can't really find it. Any help?

Nintendo Kid
Aug 4, 2011

by Smythe

hooah posted:

What's the best way to add an "open all unread" button to the bookmarks page? I've been using Chrome for a while, but the way it sometimes doesn't play video, or maybe doesn't play the sound for a video is starting to get to me. Before I switched away from FF, I used to have something that added that button. It might have been a Greasemonkey script, but since userscripts.org is down, I can't really find it. Any help?

I'm not sure if this will work in Chrome but this works in Firefox Greasemonkey:

code:
// ==UserScript==
// @id             jerkikosnewtabs
// @name           jerkikosnewtabs
// @version        1.0
// @namespace      
// @author         
// @description    
// @include        http://forums.somethingawful.com/*
// @grant          GM_openInTab
// @run-at         document-end
// ==/UserScript==
var forum = document.getElementById("forum");
if (forum)
{	
	var button = document.createElement("a");
	button.href = "#";
	button.innerHTML = "Open New Posts in New Tabs";
	button.style.cssFloat = "right";
	button.style.marginRight = "8px";
	button.addEventListener("click", NewPostsInNewTabs, false);

	var where = document.evaluate("THEAD/TR/TH[contains(@class,'title')]",
			forum, null, 7, null);
	where = where.snapshotItem(0);
	if (where)
	{
        
		where.insertBefore(button,where.firstChild);
	}
}

function NewPostsInNewTabs(event)
{
	var eval, node, name;
	event.preventDefault();
	eval = document.evaluate("TBODY/TR/TD/DIV/DIV/A[contains(@class,'count')]",
			document.getElementById("forum"), null, 7, null);
	OpenTabLoop(eval);

	return;
}

var i =0;
function OpenTabLoop(eval){
	if (i < eval.snapshotLength){
		setTimeout(function(){		
			node = eval.snapshotItem(i);
            node = node.href;
			i++;
			OpenTabLoop(eval);
            GM_openInTab(node);
			
		},(i*3)+250);
	}

}
It also works on the forum index pages.

hooah
Feb 6, 2006
WTF?

Nintendo Kid posted:

I'm not sure if this will work in Chrome but this works in Firefox Greasemonkey:

It also works on the forum index pages.

Yeah, I guess I worded my post poorly; I'm trying out switching back to Firefox, so this is exactly what I wanted; thanks.

Now for something related to the extension proper: could the option to convert NMS links be separated from NWS ones? Especially when I'm at home, I don't care about NWS images, but might want to avoid NMS ones.

McSpanky
Jan 16, 2005






Emotes have stopped displaying in the quick reply preview window and the emote list button hangs on "loading emoticons", seems to have started around 3 days ago. Double-checked the Disable Smilies box, it's not selected. Anyone else experiencing this?

ryanbruce
May 1, 2002

The "Dell Dude"

McSpanky posted:

Emotes have stopped displaying in the quick reply preview window and the emote list button hangs on "loading emoticons", seems to have started around 3 days ago. Double-checked the Disable Smilies box, it's not selected. Anyone else experiencing this?

I used the emote drop down (preview window disabled) earlier today with success.

Nate RFB
Jan 17, 2005

Clapping Larry

Nintendo Kid posted:

I'm not sure if this will work in Chrome but this works in Firefox Greasemonkey:

code:
// ==UserScript==
// @id             jerkikosnewtabs
// @name           jerkikosnewtabs
// @version        1.0
// @namespace      
// @author         
// @description    
// @include        [url]http://forums.somethingawful.com/*[/url]
// @grant          GM_openInTab
// @run-at         document-end
// ==/UserScript==
var forum = document.getElementById("forum");
if (forum)
{	
	var button = document.createElement("a");
	button.href = "#";
	button.innerHTML = "Open New Posts in New Tabs";
	button.style.cssFloat = "right";
	button.style.marginRight = "8px";
	button.addEventListener("click", NewPostsInNewTabs, false);

	var where = document.evaluate("THEAD/TR/TH[contains(@class,'title')]",
			forum, null, 7, null);
	where = where.snapshotItem(0);
	if (where)
	{
        
		where.insertBefore(button,where.firstChild);
	}
}

function NewPostsInNewTabs(event)
{
	var eval, node, name;
	event.preventDefault();
	eval = document.evaluate("TBODY/TR/TD/DIV/DIV/A[contains(@class,'count')]",
			document.getElementById("forum"), null, 7, null);
	OpenTabLoop(eval);

	return;
}

var i =0;
function OpenTabLoop(eval){
	if (i < eval.snapshotLength){
		setTimeout(function(){		
			node = eval.snapshotItem(i);
            node = node.href;
			i++;
			OpenTabLoop(eval);
            GM_openInTab(node);
			
		},(i*3)+250);
	}

}
It also works on the forum index pages.
This is nice since it seems to replicate the feature from SAplusplus, which broke a little while back. But I can not for the life of me figure out how to set it up to close the Control Panel after hitting that button (I could so with window.close() in SAplusplus). No matter what I try it it just closes everything.

minato
Jun 7, 2004

cutty cain't hang, say 7-up.
Taco Defender
SAPlusPlus works now, I had to rehost it since userscripts.org seems to be dead. You can install a working version here:

https://github.com/coverprice/SAplusplus/raw/master/94231.user.js

Nate RFB
Jan 17, 2005

Clapping Larry
Yeah, that works. Thanks! I did kind of like having "open all threads" on each forum so one day I'll probably try to see if I could get that working in conjunction with SA++ as well.

I'm not sure this is totally pertinent to the SALR thread, but in terms of other SA-related greasemonkey scripts how easy would it be to implement one that replaces images on the forums with one from a different URL? Well, actually that part is easy, even I could figure it out from just googling it. The hard part is finding a way to make it work before the images are loaded in the first place. The one I got working only turns on after the page is fully loaded. I tried "@run-at document-start" but that just seemed to disable the image replacement script completely.

Nintendo Kid
Aug 4, 2011

by Smythe
The better way to replace images is with a stylesheet that overrides calls for images you want to change, presuming you mean forum ui images.

buglord
Jul 31, 2010

Cheating at a raffle? I sentence you to 1 year in jail! No! Two years! Three! Four! Five years! Ah! Ah! Ah! Ah!

Buglord
I haven't used SALR Firefox in a super long time. Is there another Addon/Plugin I'm supposed to be using to make this work?

astral
Apr 26, 2004

Avocados posted:

I haven't used SALR Firefox in a super long time. Is there another Addon/Plugin I'm supposed to be using to make this work?

Nope, just SALR. Grab the latest version (1.99.140618) here.

buglord
Jul 31, 2010

Cheating at a raffle? I sentence you to 1 year in jail! No! Two years! Three! Four! Five years! Ah! Ah! Ah! Ah!

Buglord

astral posted:

Nope, just SALR. Grab the latest version (1.99.140618) here.

What program do I use to open the file though? It just saves to my downloads and OSX doesn't know what to do with it.

astral
Apr 26, 2004

Avocados posted:

What program do I use to open the file though? It just saves to my downloads and OSX doesn't know what to do with it.

Dragging and dropping it from your downloads into a Firefox window ought to work.

buglord
Jul 31, 2010

Cheating at a raffle? I sentence you to 1 year in jail! No! Two years! Three! Four! Five years! Ah! Ah! Ah! Ah!

Buglord
That was incredibly easy. Thanks boss!

Flipperwaldt
Nov 11, 2011

Won't somebody think of the starving hamsters in China?



I'd like to report that changing Windows' DPI Scaling to something ridiculously high like 200% and then changing it back to something more reasonable in the 110%-125% range causes the Add User/Delete User and Update User Note buttons to be obscured with a grey bar, presumably the one where the OK/Cancel buttons are placed in. This persists through browser and computer restarts.

Changing the DPI Scaling back to 100% fixes it and from there you can creep upwards again with no problem. For some cargo cult reason, I'm unchecking the XP Style Scaling checkbox every time even though I don't know what the difference is.

Don't know if that's Windows or Firefox misbehaving or if it is indeed an SALR bug, but if you're really, really bored, it's something you could take a look at if you want.

Magnus Praeda
Jul 18, 2003
The largess in the land.
My dropdown menu is experiencing some weirdness as shown here:



The grenade image seems to be rendering behind the default grey around menu items. Is this something wrong with SALR/did something break when I updated to Firefox 33.0?

astral
Apr 26, 2004

Magnus Praeda posted:

My dropdown menu is experiencing some weirdness as shown here:



The grenade image seems to be rendering behind the default grey around menu items. Is this something wrong with SALR/did something break when I updated to Firefox 33.0?

Is this still happening? If so, are you using any sort of custom Firefox theme?

Magnus Praeda
Jul 18, 2003
The largess in the land.

astral posted:

Is this still happening? If so, are you using any sort of custom Firefox theme?

Yes it is and no I'm not.

Possibly pertinent info:
This is on a MacBook running Yosemite and Firefox 33.0.2 (it was 33.0 when it started happening).
My desktop running Windows 7 and my Windows 8.1 tablet are both running Firefox 33 as well and it is not happening on either of those.

calandryll
Apr 25, 2003

Ask me where I do my best drinking!



Pillbug
Interesting because it works fine on my retina Macbook Pro, ie I can see the grenade logo. Running Yosemite and latest version of Firefox.

Magnus Praeda
Jul 18, 2003
The largess in the land.

calandryll posted:

Interesting because it works fine on my retina Macbook Pro, ie I can see the grenade logo. Running Yosemite and latest version of Firefox.

This is a unibody MacBook (Late 2008), though I can't imagine that would make a difference.

calandryll
Apr 25, 2003

Ask me where I do my best drinking!



Pillbug

Magnus Praeda posted:

This is a unibody MacBook (Late 2008), though I can't imagine that would make a difference.

Yeah that shouldn't matter. The only difference is I'm using the dropdown menu and not the button on the toolbar. I wonder if that's it.

astral
Apr 26, 2004

Magnus Praeda posted:

Yes it is and no I'm not.

Possibly pertinent info:
This is on a MacBook running Yosemite and Firefox 33.0.2 (it was 33.0 when it started happening).
My desktop running Windows 7 and my Windows 8.1 tablet are both running Firefox 33 as well and it is not happening on either of those.

Please check if this test build fixes it on your Mac.

hooah
Feb 6, 2006
WTF?
I reformatted my Windows box recently, and now my quotes aren't highlighted in the correct color. Here's what my color settings are (default, I believe):


And here's what I see:


What's going on?

Master_Odin
Apr 15, 2010

My spear never misses its mark...

ladies
SomethingAwful actually highlights your own quotes now by default (as of yesterday?).

astral
Apr 26, 2004

hooah posted:

I reformatted my Windows box recently, and now my quotes aren't highlighted in the correct color. Here's what my color settings are (default, I believe):


And here's what I see:


What's going on?

From a quick test, it looks like SALR is currently having trouble with picking up usernames on a fresh install, so it's not properly highlighting your quote. As Master_Odin mentioned, the forums have their own quote highlighting now, so you're seeing that instead. Go ahead and set extensions.salastread.username to your username in about :config and that should fix things for you.

I'll take a look into why it's happening tonight or tomorrow.

Adbot
ADBOT LOVES YOU

Crankit
Feb 7, 2011

HE WATCHES
Is it possible to disable the Add colouring note button, i basically never use it and only ever hit that accidentally, also the same with Hide Avatar.

  • Locked thread