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 showin开发者_StackOverflowg 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 = '...'
精彩评论