https://github.com/nickstenning/framelocation
A tiny snippet of javascript to make more useful URLs for pages stuck in <frameset>s.
https://github.com/nickstenning/framelocation
Last synced: 11 months ago
JSON representation
A tiny snippet of javascript to make more useful URLs for pages stuck in <frameset>s.
- Host: GitHub
- URL: https://github.com/nickstenning/framelocation
- Owner: nickstenning
- Created: 2010-03-21T15:17:05.000Z (over 16 years ago)
- Default Branch: master
- Last Pushed: 2010-03-22T19:16:01.000Z (over 16 years ago)
- Last Synced: 2025-02-09T21:12:39.358Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 93.8 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
# framelocation.js
framelocation.js is a tiny script with no external dependencies that makes it possible to display useful (if slightly ugly) URLs when loading a website within a frame from another website.
Say your website lives at http://my.cheap.host/~user/, but you also own http://snazzydomain.com/.
1. Edit framelocation.js and update frameRoot to be "http://my.cheap.host/~user" (NB: no trailing slash).
2. Update framesetDomain to be "http://snazzydomain.com".
3. Put your edited version of framelocation.js somewhere web-accessible.
4. Add `` to the bottom of each framed page's `` tag.
At this point, when you visit a page on your site through a frame at http://snazzydomain.com/, the hash part of the URL will update to reflect your location.
i.e. If you are looking at http://my.cheap.host/~user/some/page.html, the URL in the address bar will be http://snazzydomain.com/#/some/page.html.
If you also have access to the frameset page at http://snazzydomain.com, you can also have the URLs serve as permanent links to particular framed locations. Add `` to the `` of the frameset page, and someone directly visiting http://snazzydomain.com/#/some/page.html will immediately see http://my.cheap.host/~user/some/page.html.