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
HarmB
Jun 19, 2006



Nate RFB posted:

I mean as a per-user option, not across the board.

You can use an ad-blocker to block specific avatars. If you put a wildcard after the username, you should block all their future avatars too if they change frequently.

Adbot
ADBOT LOVES YOU

Serfer
Mar 10, 2003

The piss tape is real



I dunno if anyone cares, since this is the chrome thread, but I did a dirty port to firefox, most poo poo works just like chrome, follow the directions here to install temporarily if you want to play with it

https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Temporary_Installation_in_Firefox

https://drive.google.com/uc?id=1WmnmBiA5EaAXOI5ljY5mqf0KEwByiUR4&export=download

Colors don't seem to work in the user control panel, and I've done zero testing, although I am posting this from the quick reply window...

Serfer fucked around with this message at 10:14 on Nov 23, 2017

Serfer
Mar 10, 2003

The piss tape is real



Also fun fact, it works equally well in chrome, so ferg or whoever could update with the couple changes I made to have it work in both

tithin
Nov 14, 2003


[Grandmaster Tactician]



Serfer posted:

I dunno if anyone cares, since this is the chrome thread, but I did a dirty port to firefox, most poo poo works just like chrome, follow the directions here to install temporarily if you want to play with it

https://addons.mozilla.org/en-US/firefox/addon/unpacked-extension-loader/

https://drive.google.com/uc?id=1WmnmBiA5EaAXOI5ljY5mqf0KEwByiUR4&export=download

Colors don't seem to work in the user control panel, and I've done zero testing, although I am posting this from the quick reply window...

Unpacked extension loader doesn't work in firefox quantum

Serfer
Mar 10, 2003

The piss tape is real



tithin posted:

Unpacked extension loader doesn't work in firefox quantum

poo poo, wrong link, I fixed it, should be this https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Temporary_Installation_in_Firefox

tithin
Nov 14, 2003


[Grandmaster Tactician]



Well, it sort of works, that's a positive.

Got this error message, not sure if you were getting it also.



Can't speak for others, but I appreciate the work you've done in getting this back.

axeil
Feb 14, 2006

Serfer posted:

I dunno if anyone cares, since this is the chrome thread, but I did a dirty port to firefox, most poo poo works just like chrome, follow the directions here to install temporarily if you want to play with it

https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Temporary_Installation_in_Firefox

https://drive.google.com/uc?id=1WmnmBiA5EaAXOI5ljY5mqf0KEwByiUR4&export=download

Colors don't seem to work in the user control panel, and I've done zero testing, although I am posting this from the quick reply window...

This is really awesome. Good on you for porting it

Master_Odin
Apr 15, 2010

My spear never misses its mark...

ladies

Serfer posted:

Also fun fact, it works equally well in chrome, so ferg or whoever could update with the couple changes I made to have it work in both
It'd be me and in this repo: https://github.com/MasterOdin/salr-chrome

iospace
Jan 19, 2038


Nice to see. Unfortunately due to my use case I don't think I'll be able to adopt it just yet (I'm not one of those users who leaves their computer with everything running for as long as possible).

Serfer
Mar 10, 2003

The piss tape is real




Cool, here's the diff:
code:
diff -r extension/js/background.js orig extension/js/background.js
38c38
< var port = chrome.runtime.connect();
---
> var port = chrome.extension.connect();
46c46
< chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) {
---
> chrome.extension.onMessage.addListener(function(request, sender, sendResponse) {
diff -r extension/js/drag_drop.js orig extension/js/drag_drop.js
1c1
< var port = chrome.runtime.connect();
---
> var port = chrome.extension.connect();
diff -r extension/js/message-handler.js orig extension/js/message-handler.js
33,34c33,34
< if(chrome.runtime.onConnectExternal != undefined) {
<     chrome.runtime.onConnectExternal.addListener(function(port) {
---
> if(chrome.extension.onConnectExternal != undefined) {
>     chrome.extension.onConnectExternal.addListener(function(port) {
53c53
< chrome.runtime.onConnect.addListener(function(port) {
---
> chrome.extension.onConnect.addListener(function(port) {
123c123
<                     var salr = chrome.runtime.connect("nlcklobeoigfjmcigmhbjkepmniladed");
---
>                     var salr = chrome.extension.connect("nlcklobeoigfjmcigmhbjkepmniladed");
diff -r extension/js/popup-handler.js orig extension/js/popup-handler.js
30c30
< var port = chrome.runtime.connect({"name":"popup"});
---
> var port = chrome.extension.connect({"name":"popup"});
diff -r extension/js/salr.js orig extension/js/salr.js
1080c1080
<     chrome.runtime.sendMessage(fancyId, {message:"installcheck"}, function(response) {
---
>     chrome.extension.sendMessage(fancyId, {message:"installcheck"}, function(response) {
diff -r extension/js/settings-handler.js orig extension/js/settings-handler.js
33c33
< var port = chrome.runtime.connect({"name":"settings"});
---
> var port = chrome.extension.connect({"name":"settings"});

iospace posted:

Nice to see. Unfortunately due to my use case I don't think I'll be able to adopt it just yet (I'm not one of those users who leaves their computer with everything running for as long as possible).

Well, this isn't really a permanent solution, more just to see if I could, and how well it would work

iospace
Jan 19, 2038


Serfer posted:

Well, this isn't really a permanent solution, more just to see if I could, and how well it would work

Well yeah, eventually it'll have to be sent to Mozilla for approval. But it's nice to know at least some functionality is still there.

iospace fucked around with this message at 21:50 on Nov 23, 2017

anilEhilated
Feb 17, 2014

But I say fuck the rain.

Grimey Drawer
So, sorry if I'm asking something really obvious, but apart from this temp fix, is there any initiative towards making it work on Firefox again or is that project completely dead?

Serfer
Mar 10, 2003

The piss tape is real



anilEhilated posted:

So, sorry if I'm asking something really obvious, but apart from this temp fix, is there any initiative towards making it work on Firefox again or is that project completely dead?

It just needs someone who's willing to take it on. If MasterOdin wants to take it on to make this cross platform, that's cool and great. It just needs a champion.

iospace
Jan 19, 2038


Cis autodrag indicated they would in the Firefox thread, contact them.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

iospace posted:

Cis autodrag indicated they would in the Firefox thread, contact them.

Ya, I was gonna do some work over my Thanksgiving break but then a bunch of poo poo came up and well Goon projects. I'll poke at this temp version if I have time but I'm not gonna pretend to be remotely dependable.

Edit: at a minimum, I'll make a github fork of chrome salr with the changes that were already made for ff compatibility and then work on it as I can. If people want to write issues against that fork to help me find/prioritize the things that don't work that'd be great. If ppl want to also contribute to that fork that would be double amazing. I'll post later this evening or tomorrow with a link.

The MUMPSorceress fucked around with this message at 22:59 on Nov 27, 2017

Capsaicin
Nov 17, 2004

broof roof roof
The only thing I really want is just the "SA" dropdown between History and Bookmarks at the top of the window :(

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

Capsaicin posted:

The only thing I really want is just the "SA" dropdown between History and Bookmarks at the top of the window :(

loving same. That is likely the first thing on my list.

tithin
Nov 14, 2003


[Grandmaster Tactician]



I liked the coloring on the control panel and the button arrow

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

tithin posted:

I liked the coloring on the control panel and the button arrow

Can you test it in Serfer's fixed version and just jot down what happens to add as an issue to the fork?

Master_Odin
Apr 15, 2010

My spear never misses its mark...

ladies
Are these changes going to be able to backport to the chrome version without breaking anything (and just improving cross-compatibility). If so, I have no issue adding you as a collaborator to the project cis autodrag and keeps things sort of unified between browsers.

tithin
Nov 14, 2003


[Grandmaster Tactician]



cis autodrag posted:

Can you test it in Serfer's fixed version and just jot down what happens to add as an issue to the fork?

Where is it and I'll try it tonight

Serfer
Mar 10, 2003

The piss tape is real



Master_Odin posted:

Are these changes going to be able to backport to the chrome version without breaking anything (and just improving cross-compatibility). If so, I have no issue adding you as a collaborator to the project cis autodrag and keeps things sort of unified between browsers.

So far, everything is cross compatible. I'm sure issues will crop up between the two implementations, but they look super close.

tithin posted:

Where is it and I'll try it tonight

Second post on this page. It's a parsing error, I haven't looked at it closely yet.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

Serfer posted:

So far, everything is cross compatible. I'm sure issues will crop up between the two implementations, but they look super close.


This is my gut feel but I'd prefer to start with a fork and PR it into the main repo only after we're sure it works in chome too.

tithin
Nov 14, 2003


[Grandmaster Tactician]



Serfer posted:

So far, everything is cross compatible. I'm sure issues will crop up between the two implementations, but they look super close.


Second post on this page. It's a parsing error, I haven't looked at it closely yet.

Ah that, yes I did install that. I'm not at my pc right now but I'll try to post a screen dump for you later tonight

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer
Clone is here: https://github.com/cisautodrag/salr-chrome

I'll add Serfer's changes tonight and then I'll look at the coloring and buttons.

Serfer
Mar 10, 2003

The piss tape is real



cis autodrag posted:

Clone is here: https://github.com/cisautodrag/salr-chrome

I'll add Serfer's changes tonight and then I'll look at the coloring and buttons.

I added this to manifest.json to get the settings page back, which allows you to enable custom thread highlighting, which enables the green coloring in the usercp and forum displays.

Also it lets you change your options.
Under
code:
"options_page":"settings.html",
I put
code:
  "options_ui": {"page": "settings.html"},
Which is also chrome compatible, btw, so the options_page could just be removed

Edit: I updated my extension.zip, which also has one other change, where I changed
code:
    jQuery('#nav-last-post').click(function() {
        var post = jQuery('div#thread > table.post').eq(findFirstUnreadPost());

        jQuery(window).scrollTop(post.offset().top);
to
code:
jQuery('#nav-last-post').first().attr('href', window.location.href.replace(/\?.*threadid/,'?threadid').replace(/\&.*$/,'&goto=newpost'));
So the lastread button works more like the old firefox version, where it reloads the page for new posts

The getthreadid function needs to be rewritten, since it should use that, but I just hacked it together to be whatever

Edit2: changed hotkey-manager.js switch(event.keyCode) to switch(event.which) to make it cross-compatible

Serfer fucked around with this message at 05:45 on Nov 28, 2017

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

Serfer posted:

I added this to manifest.json to get the settings page back, which allows you to enable custom thread highlighting, which enables the green coloring in the usercp and forum displays.

Also it lets you change your options.
Under
code:
"options_page":"settings.html",
I put
code:
  "options_ui": {"page": "settings.html"},
Which is also chrome compatible, btw, so the options_page could just be removed

Edit: I updated my extension.zip, which also has one other change, where I changed
code:
    jQuery('#nav-last-post').click(function() {
        var post = jQuery('div#thread > table.post').eq(findFirstUnreadPost());

        jQuery(window).scrollTop(post.offset().top);
to
code:
jQuery('#nav-last-post').first().attr('href', window.location.href.replace(/\?.*threadid/,'?threadid').replace(/\&.*$/,'&goto=newpost'));
So the lastread button works more like the old firefox version, where it reloads the page for new posts

The getthreadid function needs to be rewritten, since it should use that, but I just hacked it together to be whatever

Edit2: changed hotkey-manager.js switch(event.keyCode) to switch(event.which) to make it cross-compatible

You work fast! thanks. I've got everything in my local branch except the lastread button since it doesn't sound like it was broken, just different.

Serfer
Mar 10, 2003

The piss tape is real



cis autodrag posted:

You work fast! thanks. I've got everything in my local branch except the lastread button since it doesn't sound like it was broken, just different.

Heh, well, I just fixed the things that annoyed me. I get that the lastread button doesn't work the way I would like, and that's ok

tithin
Nov 14, 2003


[Grandmaster Tactician]



I've still got the temporary addon installed from the other night, assuming you've not updated it since then?



this is what my UCP looks like

related: the smilies button on the right of the in-page quick reply javascript window doesn't work.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

tithin posted:

I've still got the temporary addon installed from the other night, assuming you've not updated it since then?



this is what my UCP looks like

related: the smilies button on the right of the in-page quick reply javascript window doesn't work.

You have to enable the highlighting in the settings. Should work in the version he linked a couple posts up.

Currently trying to work out how the SA menu works in chrome (does it exist in chrome? I see the button but no way to add forums to its menu).

edit: i'm giving up defeated for the night cuz my typing's keeping my partner awake.

The MUMPSorceress fucked around with this message at 07:57 on Nov 28, 2017

tithin
Nov 14, 2003


[Grandmaster Tactician]



cis autodrag posted:

You have to enable the highlighting in the settings. Should work in the version he linked a couple posts up.

Currently trying to work out how the SA menu works in chrome (does it exist in chrome? I see the button but no way to add forums to its menu).

edit: i'm giving up defeated for the night cuz my typing's keeping my partner awake.


Bearing in mind I'm a functional moron - I have no idea how to edit JSON's to match the updated version differences he mentioned above, short of just... opening it in notepad?

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

tithin posted:

Bearing in mind I'm a functional moron - I have no idea how to edit JSON's to match the updated version differences he mentioned above, short of just... opening it in notepad?

that's basically it, yeah. Like I said, I have it in my local branch but there's a bunch of problems I need to fix over the next week or two before I'd have something worthy of testing. For example, I don't think the famous firefox grenade menu exists on the chrome side so I'm going to have to implement it from scratch.

Serfer
Mar 10, 2003

The piss tape is real



tithin posted:

I've still got the temporary addon installed from the other night, assuming you've not updated it since then?



this is what my UCP looks like

related: the smilies button on the right of the in-page quick reply javascript window doesn't work.

Yeah, I updated my zip, if you want to re-download

Serfer
Mar 10, 2003

The piss tape is real



cis autodrag posted:

that's basically it, yeah. Like I said, I have it in my local branch but there's a bunch of problems I need to fix over the next week or two before I'd have something worthy of testing. For example, I don't think the famous firefox grenade menu exists on the chrome side so I'm going to have to implement it from scratch.

There's this https://chrome.google.com/webstore/detail/something-awful-last-read/dodkgjokbnmiickhikhikpggfohagmfb?hl=en

tithin
Nov 14, 2003


[Grandmaster Tactician]



oh my god thank you

Master_Odin
Apr 15, 2010

My spear never misses its mark...

ladies

cis autodrag posted:

that's basically it, yeah. Like I said, I have it in my local branch but there's a bunch of problems I need to fix over the next week or two before I'd have something worthy of testing. For example, I don't think the famous firefox grenade menu exists on the chrome side so I'm going to have to implement it from scratch.
Historically, the functionality was that Chrome (up to version 48 or so) allowed extensions to put actions/icons into Chrome's omnibar, which SALR used to have a forum's jump list for whatever. This icon would then only show up when you were on the site. However, for users that wanted something a bit more permanent, they could then install a secondary extension (linked to by Serfer) which would override the omnibar jump list and give you the grenade icon you know and love. However, since the omnibar jumplist is dead, the functionality of the two extensions should probably be merged (and we can then also get rid of some amount of the port messaging making the architecture simpler in the process).

So I think I'm going to contact Github to turn this fork into a standalone repo, and work on merging the two extensions into one (as well as merging Serfer's diff into the repo as I'm using some deprecated stuff right now), dragging along cis autodrag's fork (hopefully). After that's done, I'm going to request this thread is also closed and I'll start a new one since now that this thread is getting activity again, it's annoying to always see "1 unread post".

(Note: I wasn't aware of the changes to Chrome 48 until right now as I've never been a user of the jump lists).

Master_Odin fucked around with this message at 14:17 on Nov 28, 2017

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

Master_Odin posted:

Historically, the functionality was that Chrome (up to version 48 or so) allowed extensions to put actions/icons into Chrome's omnibar, which SALR used to have a forum's jump list for whatever. This icon would then only show up when you were on the site. However, for users that wanted something a bit more permanent, they could then install a secondary extension (linked to by Serfer) which would override the omnibar jump list and give you the grenade icon you know and love. However, since the omnibar jumplist is dead, the functionality of the two extensions should probably be merged (and we can then also get rid of some amount of the port messaging making the architecture simpler in the process).

So I think I'm going to contact Github to turn this fork into a standalone repo, and work on merging the two extensions into one (as well as merging Serfer's diff into the repo as I'm using some deprecated stuff right now), dragging along cis autodrag's fork (hopefully). After that's done, I'm going to request this thread is also closed and I'll start a new one since now that this thread is getting activity again, it's annoying to always see "1 unread post".

(Note: I wasn't aware of the changes to Chrome 48 until right now as I've never been a user of the jump lists).

There's nothing in my fork that isn't in surfer's diff so far so you can probably skip that step. If you'd rather we could make a feature branch on your repo for the work to make it cross compatible and to add the jump list.

iospace
Jan 19, 2038


Question, would it be possible to have the pop-up window like the old Firefox extension did or did that get killed with web extensions?

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

iospace posted:

Question, would it be possible to have the pop-up window like the old Firefox extension did or did that get killed with web extensions?

Web extensions support pop-ups, so it's feasible, but we should probably just pick one behavior for each feature with diverging implementations. I hate quick reply so I'm not gonna weight my own opinion at all as to which version is better.

Adbot
ADBOT LOVES YOU

Serfer
Mar 10, 2003

The piss tape is real



cis autodrag posted:

Web extensions support pop-ups, so it's feasible, but we should probably just pick one behavior for each feature with diverging implementations. I hate quick reply so I'm not gonna weight my own opinion at all as to which version is better.

I like the external window way better, but I get that I'm a weirdo

  • Locked thread