I have a new extension I'm making, the button makes a drop down popup and in that I have the HTML code
<html>
Google
</html>
This code should direct to google, shouldn't it? I know that its working because Google comes up on the popup but when I click it it does nothing.
Use anchor tag with : target="_blank"
Related
Is is possible to load special javascript code (created by me) to my browser console (mozilla firefox) on every redirect page? I want to create a special script-robot, which will be do special actions on some website. For example:
Click button: "Add new advert"
... NOW IS REDIRECT
Write to input[name='title'] advert title
Write to input[name='description'] advert description
Click button: "Add now!"
... NOW IS REDIRECT
Click button: "Logout".
So I want to include my own javascript code to my console and I want automatically reinclude this file on every page redirect. Is is possible?
Thanks.
yes, it is possible. What you would do is create your own google extension with links to a js file to run. Here are some instructions on how to make said extension.
I have a very simple webextension that, when new tab is clicked, it's overriden by an html that displays a site inside an iframe.
Relevant aprt of the manifest.json:
"chrome_url_overrides": {
"newtab": "background.html"
},
"permissions": ["tabs"]
and background.html is as simple as:
<html>
<iframe src="https://app.everydaycheck.com">
everydayCheck
</iframe>
</html>
This extension works smoothly for Chrome, you click newtab and while the new tab is displaying/loading the site you can immediately start typing in the omnibox for whichever google search you want. However, that's not the case in Firefox.
While in Firefox 56, the omnibox was populated by the local url of the web extension, Firefox 57 doesn't show it anymore, but it doesn't autofocus the omnibox either.
Looking at https://github.com/cadeyrn/newtaboverride/blob/70d2186b0eb7f8f5ddaaefb4f51b5332127f4ba2/src/js/core/newtab.js#L94 it does seem it should work though.
One thing I have noticed is, if I have focused the omnibox before I click new tab, then the resulting new tab has the omnibox focused. However, if I have been browsing through a website and click new tab, it doesn't.
I don't think the application is "stealing focus" from the omnibox because before the site has loaded, the omnibox has already lost focus.
Does anyone have any idea of how to go about this rather simple and obvious webextension?
By the way, you can try if it works for you:
https://addons.mozilla.org/en-US/firefox/addon/everydaycheck-do-it-every-day/
Thank you.
I have a website that i've set up through google sites. I have a link to an external webpage. What I'd really like to have happen is, if someone clicks the link, it shows a jpg picture for about 5 seconds and then forwards them off to the linked website. Is there a way to do that?
Thanks,
Rich
Adding to following tag:
<META http-equiv="refresh" content="5;URL=http://example.com">
to the <head> section of a webpage will redirect the user to example.com, or whatever the URL value is. You can display an image in the <body> section of this page. This seems like the simplest way to accomplish what you want.
I have a page that I want to be loaded only from an iFrame.
I use the solution on this link to do it.
How to identify if a webpage is being loaded inside an iframe or directly into the browser window?
but it doesn't work in IE so I use conditional comments like this
<!--[if IE 9]>
<script type="text/javascript">
window.location = "http://mysite.com/nodirectvisit.html";
</script>
<![endif]-->
Together they are now working in IE, Chrome, FF, and Opera.
I just want to ask if there are still other ways to visit my page directly?
Thanks
If a user disables javascript, then your code will not run. Maybe use Sessions to track from where users are coming from?
Anyone with javascript disabled or NoScript would be able to open the page directly. The javascript should prevent the majority of users.
You can check the referrer of the iframe page to make sure it's the page that contains the iframe. The referrer isn't the most reliable field, but if you're more worried about people visiting the page not in an iframe than people not being able to see it at all, that might be the way to go.
I created a simply html page include css and js.
When the page is using in the webview How i can add adsense ? Does AdSense work fine ?
WebView is just a html viewer. There is no reason why it would not work with Google AdSense. Adsense generates html ads which should be viewable in a WebView.
Create the appropriate html for including Adsense in a document by following Google's documentation.
Load your html in a standard browser like Chrome and ensure that advertisements are displaying correctly there.
Once your advertisements are displaying correctly in Chrome, then load the same html into WebView - it should work fine.