I have made a Chrome Extension for webpage translation but when I load a https:// based website and click on the chrome extension, it shows the shield icon and asks to click on to load unsafe script. But what I want is, when I click on chrome extension it should automatically load that page and start the translating process, I don't want that shield message to intervene between clicking on chrome extension and my servlet code. I have read about a command --allow-running-insecure-content and I don't know how to use it in my java code to automatically load that website.
I have not done it yet because I am not sure that this is write solution or not and it is also related to security so I didn't want to take risk with my computer without any proper guidance about it. Kindly help me. How to automatically load the scripts without clicking on that shield button.
Thanks in advance.
try to remove the http: or https: and use just //
http://path.to.image => //path.to.image
Related
Our website has been serverd via Cloudflare proxy for a long time and everything goes well. Recently we wanted to place social media buttons on the webpages, we have buttons for LINE and for Facebook. Buttons of both social media work normally when tested in localhost. However, when the page is updated to the production environment, we find that LINE's buttons do no show and only Facebook's is viewable. Later we found that by turnning off Cloudflare's proxy LINE's buttons appear! This issue is illustrated in the figure. It is also confirmed that if we put the page in another server where pages do NOT go through Cloudflare proxy, LINE's buttons can be seen normally. The buttons are embedded to the webpage using simple html and javascript.
We do not want to turn off Cloudflare proxy for good just in order to show the the social media buttons, but we have no idea about how to prevent LINE's buttons from invisible. Could you please help pointing out what is the key we missed? Thank you very much!
It would be worth checking if you have specific Cloudflare features enabled which may affect the execution of 3rd party Javascript code:
Check "JS" Auto Minification in the Speed options (documentation)
Check Rocket Loader and if enabled, try disabling it (documentation)
Typically (1) is very unlikely to cause any issues. You should also check and share if there are any errors in the browser developer console, or with loading resources in the two scenarios - this would help finding a root cause.
I was doing some modifications in javascript on some website in Google Chrome to see what changes appear on the web page.
What I observed that I am not able to see the complete javascript code on the element tab in developer tools. The same code exists on the Source tab able to modify that but those modification doesn't work at it doesn't work once DOM is loaded. This is the screenshot of what I am getting:
It is in HTML edit mode and this script is part of html page.... at
the end, it is not a complete script.
ScreenShot:
Is there any way to get it complete in element tab or any other way to modify script?
If you right click on the tag and select "Edit as HTML", you'll be able to access the whole script, without the hyphenation.
You won't be able to change Javascript code through the source tab and expect it to run your new code on reload. If you want to run Javascript on a website with Google Chrome Developer Tools, I'd suggest using the console tab and adding the code you'd want to run on the website. It won't save, but it's essentially the same as injecting Javascript to run on a website.
We use Atalasoft's web image viewing SDK to display TIF images in a web page. We recently upgraded to their client-side, JavaScript/jQuery based component and discovered some odd behavior. After initializing the control, if a link is clicked to a resource that should be downloaded, the control(s) clear themselves out. The issue exists in Chrome and IE 11 that I have tested.
Since it is a paid SDK, the easiest way to test this is to go to their demo at:
http://www.atalasoft.com/demos/dotimagewebdemo/
Once the page finishes loading, open a developer console and paste in the following (simply adds a download link to a file on their site):
$("body").append($("<div style='position:absolute;right:5px;top:5px;'><a href='/Gallery/WebViewingDemo.zip'>DOWNLOAD</a></div>"))
Clicking the download link will wipe out their controls on the page.
Adding download to the anchor tag resolves the issue in Chrome, but not IE.
Adding target='_blank' resolves the issue in both, but creates an ugly blank window first (that in my experience does not always close).
I am setting headers server-side to tell the browser to download the file rather than displaying it.
I guess my questions are two-fold:
Is it normal for JavaScript/jQuery based objects to disappear/destroy/whatever when a link is clicked to download a file or is this a problem with their implementation?
and
What is the best solution for this (preferably without the blank page showing up)? We need to support mainly Chrome, FF, and IE (most popular desktop versions).
Thanks in advance!
I am building a chrome app for a client that will run in kiosk mode to display in their stores. Right now I have an index.html page that links to about 30 other pages. However, when I click on a link in the app I get an error...
Can't open same-window link to "chrome-extension://leghflngpfmomcflabikghiemaajadne/poweredge"; try target="_blank".
So I tried target="_blank" and that tries to open it in a new chrome window.. no good. I've been reading a little bit about using webview and sandboxing pages but they both open the pages in a new window and it just doesn't look good.
Is there a better way to do this? Right now my only idea is to place all of the content on the index.html page and turn on/off sections of the content with jQuery. I'd love to keep all of the pages separate though, just for my own sanity.
Thanks!
Navigation is disabled for the Chrome Apps platform. In theory you are supposed to make single-page apps - so your turn on/off approach is the "intended" one.
No-one stops you from having several windows though - suppose you have an options page, it wouldn't be strange to open it separately (via chrome.app.window.create)
As stdob mentions in comments, a workaround may be possible by using <webview> with a partition blessed to show local resources. It's not clear though if it will allow access to apps APIs.
I am working on a firefox extension that gets the html content from the current tab in the browser. Majority of the processing takes place in popup.js file which is embedded in the popup UI that is displayed on clicking the toolbar icon for the extension. Due to this, the performance of the extension suffers and occasionally I see a spinning wheel while capturing. Is there a way I could move this processing to the background? I am loading a script using the loadFrameScript api when the capture button is clicked.
Is there any such thing as background page in Firefox extensions like in chrome and Safari? If no, please suggest a way to optimize this.
Use a Web Worker, if there is some reason why you can't then can you explain that?