BitShares Forum
Main => Stakeholder Proposals => Topic started by: toast on July 23, 2014, 03:18:51 am
-
The client has support for direct-linking to actions.
Replace "NAME" with an account name.
Anywhere outside of simplemachines forum:
Link to account:
<a href="btsx:NAME">Visit my account page</a>
One-click approve:
<a href="btsx:NAME/approve">Approve my delegate</a>
One-click unapprove:
<a href="btsx:NAME/disapprove">Vote out this bad delegate!</a>
In simplemachines forum (including bitsharestalk.org) or anywhere it hijacks non-http schemes:
(thanks nathanhrout for the redirect idea)
[url=daslab.io/scheme/btsx/NAME]Visit my account page.[/url]
[url=daslab.io/scheme/btsx/NAME/approve]Approve my delegate.[/url]
[url=daslab.io/scheme/btsx/NAME/disapprove]Vote out this bad delegate![/url]
Try it out
Approve my delegate! (http://daslab.io/scheme/btsx/daslab/approve)
Vote out this unreliable delegate! (http://daslab.io/scheme/btsx/viv/disapprove)
And this one! (http://daslab.io/scheme/btsx/mister/disapprove)
This one too! (http://daslab.io/scheme/btsx/btsdac-delegate/disapprove)
(note that the app's thumb does not reflect the true state directly after using approve/disapprove url - we'll fix this for next release)
-
I'm in Firefox 30 and this doesn't seem to do anything for me. I just get a whitescreen, no redirect to btsx://etc... However I came up with this idea independently and created a slightly different implementation that might work in browsers that yours does not work in:
Approve me on the forums! (http://the8thbit.github.io/bitshares.html?name=eightbit&action=approve)
The syntax is:
[url=http://the8thbit.github.io/bitshares.html?name=NAMEt&action=ACTION]TEXT[/url]
With the stuff in caps replaced with whatever you want. So for example, this is how I did the one above:
[url=http://the8thbit.github.io/bitshares.html?name=eightbit&action=approve]Approve me on the forums![/url]
Instead of using multiple directories as you seem to be doing, I'm using a single html file with inline js that extracts URL parameters and then uses them to construct a new URL which you are then redirected to. It's all very basic js, so it should work in most browsers. That said, I can't tell for sure as I don't run the GUI client, but it gives me the redirect to the btsx URL. At that point, your browser/wallet should figure out the rest.
Anyone want to try this one and tell me if it works?
Btw, where is the repo for your version? I had trouble finding it, and I'd like to read through your code to see where the problem might be.
-
> I can't tell for sure as I don't run the GUI client
Well there's your problem, the hooks are only installed when you install the GUI.
> Btw, where is the repo for your version? I had trouble finding it, and I'd like to read through your code to see where the problem might be.
The "code" is this line in apache config:
RedirectMatch ^/scheme/btsx/(.*)$ btsx:$1
-
> I can't tell for sure as I don't run the GUI client
Well there's your problem, the hooks are only installed when you install the GUI.
Yeah, I was just confused because I wrote it client side and got a more descriptive error from the browser when I did that.
The "code" is this line in apache config:
RedirectMatch ^/scheme/btsx/(.*)$ btsx:$1
Ah, that's clever!