Skip to content
This repository has been archived by the owner on Feb 14, 2018. It is now read-only.

Moving to your home server. #175

Open
nrn opened this issue Apr 4, 2012 · 7 comments
Open

Moving to your home server. #175

nrn opened this issue Apr 4, 2012 · 7 comments

Comments

@nrn
Copy link
Collaborator

nrn commented Apr 4, 2012

Something I came up with during our discussion today, a bookmarklet that will let you bring the pages you are looking at back to your home server, rebasing you on that root url.

Just replace home with your home server, and make a bookmark who's location is the code box below.

javascript:(function () {var url = [], home = 'nrn.io', host = document.location.host, stuff = document.location.pathname.split('/'); for (var i = 0; i < stuff.length; i += 1){x = stuff[i]; if (x == 'view') x = host; if (x == home) x = 'view'; url.push(x);}; document.location = 'http://' + home + url.join('/');})();
@WardCunningham
Copy link
Owner

Sounds awesome. Much better than drag-and-drop method.
(I'm too tired to think about code tonight. More later.)

On Apr 4, 2012, at 12:49 PM, Nick Niemeir wrote:

Something I came up with during our discussion today, a bookmarklet that will let you bring the pages you are looking at back to your home server, rebasing you on that root url.

[Rebase](javascript:%28function %28%29 {var url = [], home =); for (var i = 0; i < stuff.length; i += 1){x = stuff[i]; if (x == 'view') x = host; if (x == home) x = 'view'; url.push(x);}; document.location = 'http://' + home + url.join('/');})();)


Reply to this email directly or view it on GitHub:
#175

@nrn
Copy link
Collaborator Author

nrn commented Apr 5, 2012

Sorry, this doesn't actually implement merging, or streamline localhost (both of which were big topics at today's hangout).

What this does is let you setup a bookmark that when clicked opens the same pages you had open, but with your home server open instead of whatever server you happen to be on. For example if I was browsing new.fed.wiki.org at say:
http://new.fed.wiki.org/view/welcome-visitors/view/how-to-wiki/fed.wiki.org/add-text/nrn.io/indie-web-camp
and then click on the browserlet i get redirected to:
http://nrn.io/new.fed.wiki.org/welcome-visitors/new.fed.wiki.org/how-to-wiki/fed.wiki.org/add-text/view/indie-web-camp

So now I've got my version of the client javascript, plugins, etc. And if I'm logged in I can edit things and they get persisted back to my server instead of local storage associated with the other site. You can see the 'view's in the original url became 'new.fed.wiki.org' in the new one, and 'nrn.io' in the old one becomes 'view' in the new one. Unrelated server 'fed.wiki.org' stays the same.

This seems to make for a pretty nice workflow. The bookmarklet works well, but i'm thinking about how to put this in the page, i'm not sure what the clean way to do that would be though.

@WardCunningham
Copy link
Owner

Maybe when you visit a page in someone else's recent changes it just does it without saying much.

Recent changes could explain the behavior and offer the bookmark for other situations.

On Apr 4, 2012, at 9:21 PM, Nick Niemeir wrote:

Sorry, this doesn't actually implement merging, or streamline localhost (both of which were big topics at today's hangout).

What this does is let you setup a bookmark that when clicked opens the same pages you had open, but with your home server open instead of whatever server you happen to be on. For example if I was browsing new.fed.wiki.org at say:
http://new.fed.wiki.org/view/welcome-visitors/view/how-to-wiki/fed.wiki.org/add-text/nrn.io/indie-web-camp
and then click on the browserlet i get redirected to:
http://nrn.io/new.fed.wiki.org/welcome-visitors/new.fed.wiki.org/how-to-wiki/fed.wiki.org/add-text/view/indie-web-camp

So now I've got my version of the client javascript, plugins, etc. And if I'm logged in I can edit things and they get persisted back to my server instead of local storage associated with the other site. You can see the 'view's in the original url became 'new.fed.wiki.org' in the new one, and 'nrn.io' in the old one becomes 'view' in the new one. Unrelated server 'fed.wiki.org' stays the same.

This seems to make for a pretty nice workflow. The bookmarklet works well, but i'm thinking about how to put this in the page, i'm not sure what the clean way to do that would be though.


Reply to this email directly or view it on GitHub:
#175 (comment)

@WardCunningham
Copy link
Owner

p.s. sounds like you were productive when I wasn't around to explain my thought on everything first.

On Apr 4, 2012, at 9:21 PM, Nick Niemeir wrote:

Sorry, this doesn't actually implement merging, or streamline localhost (both of which were big topics at today's hangout).

What this does is let you setup a bookmark that when clicked opens the same pages you had open, but with your home server open instead of whatever server you happen to be on. For example if I was browsing new.fed.wiki.org at say:
http://new.fed.wiki.org/view/welcome-visitors/view/how-to-wiki/fed.wiki.org/add-text/nrn.io/indie-web-camp
and then click on the browserlet i get redirected to:
http://nrn.io/new.fed.wiki.org/welcome-visitors/new.fed.wiki.org/how-to-wiki/fed.wiki.org/add-text/view/indie-web-camp

So now I've got my version of the client javascript, plugins, etc. And if I'm logged in I can edit things and they get persisted back to my server instead of local storage associated with the other site. You can see the 'view's in the original url became 'new.fed.wiki.org' in the new one, and 'nrn.io' in the old one becomes 'view' in the new one. Unrelated server 'fed.wiki.org' stays the same.

This seems to make for a pretty nice workflow. The bookmarklet works well, but i'm thinking about how to put this in the page, i'm not sure what the clean way to do that would be though.


Reply to this email directly or view it on GitHub:
#175 (comment)

@interstar
Copy link

Cool Nick, works for me. Even pictures come across.

BTW : I used this ( http://userjs.up.seesaa.net/js/bookmarklet.html ) to make the bookmarklet.

But I guess you could just have it automatically created as a button along the bottom of the page, alongside the "logout".

No Ward! You were sadly missed.

@hallahan
Copy link
Contributor

hallahan commented Apr 5, 2012

I like this bookmarklet approach, and I agree, having a button in the bottom panel makes sense. Perhaps one could include a text box to input your home url?

I am not clear on the original method to fork pages from one server to another. Is this done only manually now, or is there some way for the user to take an entire view from one server and put it on his own with the [f] added?

@almereyda
Copy link
Contributor

Is this here similiar to https://gist.github.com/nrn/3669857 ?
Or is there somewhere a centralized collection of Bookmarklets / Best-Practices / Third-Party addons etc. ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants