bandcamp_volume icon indicating copy to clipboard operation
bandcamp_volume copied to clipboard

Plugin doesn't work on redirected bandcamp sites.

Open helloitszak opened this issue 11 years ago • 6 comments

Apparently Bandcamp users can host their bandcamps on their own domains. The current plugin only has access to ://.bandcamp.com through a content script. Do some research and figure out how to better handle this

Example for redirected site: http://recordiaulliwgar.com/album/y-record-goch

helloitszak avatar Apr 18 '13 08:04 helloitszak

I worked around this issue by loading your (excellent!) script via TamperMonkey (the Chrome equivalent of GreaseMonkey for Firefox, as if you needed me to tell you that), necessitating two small changes, because user scripts do not have access to the localstorage API:

// chrome.storage.local.set({"volume":newvol}) GM_setValue({"volume":newvol})

and

// chrome.storage.local.get("volume", function(items) { GM_getValue("volume", function(items) {

Using Tampermonkey allows me to specify additional redirected sites on which your (outstanding!) script can function. Since you've got a full-on extension going, you could possibly add a config screen where folks could add redirects that will function with the (wonderful!) extension.

dmland avatar Oct 31 '14 18:10 dmland

I'm still trying to figure out how to do this well, since you need to predeclare which sites the script will have access on in the manifest file. That cannot be changed at runtime as far as I know.

An idea would be to run it everywhere and simply detect if it's bandcamp or not, but then I'd have to inject a script on every page and I really would rather not do that.

helloitszak avatar Oct 31 '14 18:10 helloitszak

I ran into this problem today... couldn't figure out why on earth the plugin had stopped working, until I looked at the URL and saw it was ryanlerman.com instead of bandcamp.com. Apparently Bandcamp is set up in a way that if you're using a custom domain, it completely disables the bandcamp.com version. So that means the plugin is broken for any artists using their own domains.

It does look like there's plenty in the HTML to detect whether it's bandcamp or not once you've got the script running, but as you pointed out, I don't think there's a way to do this without injecting it into every page.

soapergem avatar Apr 13 '17 21:04 soapergem

So Chrome has a feature that makes this possible now. The user experience won't be the best for non bandcamp.com sites, as you'd have to manually run it each time, but it'd be better than nothing.

I'm in the process of a big code overhaul for this, clean up some messy stuff. So hopefully I can include this as part of the update.

helloitszak avatar Sep 29 '17 21:09 helloitszak

Preferably optional, for user trust and possibly performance

half-duplex avatar Jul 14 '20 06:07 half-duplex

As a workaround, I found a hacky way to open a *.bandcamp.com version of a custom-domain site. If you have a coolband.com URL, change it to coolband.com/?fan_action_pane=login. Then it redirects you to coolband.bandcamp.com/?fan_action_pane=login, where this extension works. Note: if you're not logged in to Bandcamp, it will show a log in overlay, but you can just close it.

PeterMinin avatar Feb 19 '22 11:02 PeterMinin