address-bar

How to get text from Address Bar in Firefox extension

拟墨画扇 提交于 2019-12-05 18:24:03
问题 I am building a Firefox Extension . I am using XUL and Javascript to do this. I need to get the text from my Firefox browser's address bar. Please don't get confused with URL where the browser has navigated, its just the text that user enters before the page redirects. Suppose user is at http://www.myexample.com or whatever page. Now he types Cricket in the Address Bar and as soon as he hits enter, I want to capture the text ("Cricket") from the address bar . I need this data to do some

Best way to implement a Web 2.0 navigation system

折月煮酒 提交于 2019-12-04 20:49:17
Now here is my situation: I'm making a CMS. When links are clicked, i would like the pages to load dynamically using Ajax. The problem in the links! The only way to change the address in the address bar real-time is to use anchor tags. But PHP doesn't get the anchor tags, thus I can't load page content on site load using PHP. And if i were to load the pages using a query string, the query string couldn't be updated in the address bar at the click of a link, since that would reload the page. I suppose Javascript could check the address, save the anchor tag in a cookie and reload the page, but I

Load remote JavaScript files via the address bar

爱⌒轻易说出口 提交于 2019-12-04 03:15:46
Is it possible to load remote JavaScript files from the address bar? I have been trying to put this into the address bar: javascript:src='http://depot.com/file.js';funcname(); I'm not using this for bad things. I'm just testing my site, that's all. If you wanted to protect your site you must learn to attack it first, right? Daniel Vassallo I guess you should be able to do the following: javascript:(function () { var newScript = document.createElement('script'); newScript.type = 'text/javascript'; newScript.src = 'http://depot.com/file.js'; document.getElementsByTagName('body')[0].appendChild

How to get text from Address Bar in Firefox extension

自作多情 提交于 2019-12-04 02:42:34
I am building a Firefox Extension . I am using XUL and Javascript to do this. I need to get the text from my Firefox browser's address bar. Please don't get confused with URL where the browser has navigated, its just the text that user enters before the page redirects. Suppose user is at http://www.myexample.com or whatever page. Now he types Cricket in the Address Bar and as soon as he hits enter, I want to capture the text ("Cricket") from the address bar . I need this data to do some processing further in my code. Marcel Korpel It doesn't seem to be possible in Google Chrome, as answers to

hide iPhone address bar with 100% height

偶尔善良 提交于 2019-12-03 18:51:44
问题 Many posts on this, but not quite for my situation. My page has flexible dimensions set to 100% width and 100% height, so the typical on-load scroll function isn't working. Any thoughts or other solutions? Thanks! CSS: * { margin:0; padding:0; } html, body { width:100%; height:100%; min-width:960px; overflow:hidden; } Javascript: /mobile/i.test(navigator.userAgent) && !pageYOffset && !location.hash && setTimeout(function () { window.scrollTo(0, 1); }, 1000);​ 回答1: This solution from Nate

What algorithm does google use to make Chrome browser's address bar to act as a default search bar for many websites?

删除回忆录丶 提交于 2019-12-02 23:08:56
I am wondering what algorithm does google use to make chrome browser's address bar to act as a default search bar for many websites like SO, Quroa etc. but not for facebook, metastackoverflow etc.. For example if you want to search for a topic in stackoverflow, you can do like this in chorme. And the search results will directly take you to the stackoverflow page. i.e. The same will happen if you choose to search quora.com also in chrome's address bar. But this won't happen if you search like facebook.com in the address bar and many other websites that have a search bar. How is this happening?

Cyrillic characters in browser address bar

守給你的承諾、 提交于 2019-12-02 07:24:20
When I put cyrillic symbols in address bar like this: http://ru2.php.net/manual-lookup.php?pattern =привет it switches to http://ru2.php.net/manual-lookup.php?pattern=%EF%F0%E8%E2%E5%F2 What does that characters -- %EF%F0%E8%E2%E5%F2 -- mean? And why is it happening? The characters are getting URL encoded . A URL may only contain a subset of ASCII characters, so anything outside plain alphanumeric and some special characters must be URL encoded. Some browsers display non-ASCII characters as human readable characters, but that's entirely up to them. In protocols, URLs are always URL encoded. 来源

hide iPhone address bar with 100% height

女生的网名这么多〃 提交于 2019-11-30 02:22:07
Many posts on this, but not quite for my situation. My page has flexible dimensions set to 100% width and 100% height, so the typical on-load scroll function isn't working. Any thoughts or other solutions? Thanks! CSS: * { margin:0; padding:0; } html, body { width:100%; height:100%; min-width:960px; overflow:hidden; } Javascript: /mobile/i.test(navigator.userAgent) && !pageYOffset && !location.hash && setTimeout(function () { window.scrollTo(0, 1); }, 1000);​ This solution from Nate Smith helped me: How to Hide the Address Bar in a Full Screen Iphone or Android Web App . Here's the essential

Change URL Address make short in PHP

若如初见. 提交于 2019-11-29 07:29:53
I have Url as: localhost/ab/directory.php?id=200 id=200 is jenny id member how to change it to localhost/ab/jenny is possible? Thanks You'll want to use mod_rewrite, a module available in apache. This will be managed by an .htaccess file within your web directory. AddedBytes has a nice tutorial for beginners on url-rewriting. See: http://www.addedbytes.com/for-beginners/url-rewriting-for-beginners/ bala3569 See: http://www.addedbytes.com/for-beginners/url-rewriting-for-beginners/ You can do this in at least 2 different ways: Use mod_rewrite for Apache to map the SEO friendly URL to your

How to remove parameters in URL and display it in address bar without causing redirect in Javascript?

烈酒焚心 提交于 2019-11-28 12:11:50
I have found numerous answers on how to extract the URL without the parameters. How do you rewrite the URL in the address bar without causing the page to reload with the new URL? shortURL = top.location.href.substring(0, top.location.href.indexOf('?')); top.location.href = shortURL // Causes redirect The goal is to extract the parameters in Javascript but not display them in the address bar. In modern browsers with support for the History object, you can use either history.replaceState() or history.pushState() to change the current URL without changing the current page. There are limitations