简体   繁体   中英

Changing shown URL with a firefox addon

How can I change the displayed URL with a firefox addon without actually changing the page location? The reason for this is so I can load a local html file but not show the actual local path in the url bar.

Example user experience: The user clicks on a button in firefox, which opens a local html file. Instead of showing the path, it shows "Local HTML File" in the address bar. The title and content of the page are as specified by the html file.

Edit: I want to build an addon that does this, not find an addon to help me do this.

When a file is bundled with the addon, it usually has a " chrome URL " (nothing to do with Google Chrome) which you have some control over. Otherwise you could just change the URL bar directly: document.getElementById('urlbar').value = '...'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM