Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is there a way to disable the chrome download bar for your web application? Or a way to programmatically install a chrome extension that disables download bar?

What I have tried:

got this option chrome.downloads.setShelfEnabled(boolean enabled) but it says "downloads.shelf" permission in addition to the "downloads" permission.
How to set these permissions using JavaScript ?
Posted
Updated 4-Apr-16 21:37pm

1 solution

Try this:


<script type="text/javascript">
function CheckPlugin()
{
var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
function findPlugin(ext) {
var thisExt, findExt;
for (var n = 0; n < navigator.plugins.length; n++) {
//alert("n value"+ navigator.plugins.length);
for (var m = 0; m < navigator.plugins[n].length; m++) {
//alert("m length:"+navigator.plugins[n].length);
thisExt = navigator.plugins[n][m].description.toLowerCase();
// alert("this exten"+thisExt);
findExt = thisExt.substring(0, thisExt.indexOf(" "));
//alert("findexes"+findExt);
if (findExt == ext)
return (true);
}
}
return (false);
}

if (is_chrome ==true) {
//alert("chrome browser");
if (findPlugin("acrobat")) {
//alert("Adobe Acrobat pdf viewer");
return true;
}
else {

alert("please disable the chrome pdf viewer and enable the Adobe Acrobat PDF viewer \n Please follow the steps:\n 1.Open the new tab 'chrome://plugins/' type the Address. \n 2. Click the Enable link in 'Adobe Acrobat' field. \n 3. click the Disable link in 'Chrome PDF Viewer'. \n 4. Close the tab and you can open the PDf files in chrome browser.");
return false;
}
}
else {
//alert("not chrome");
}
}

</script>
 
Share this answer
 
Comments
Member 11368627 5-Apr-16 3:49am    
Thank You. But the problem is that we do not wish to let the users know that the download bar is being disabled. Need this to be done as a background task. Only for this particular application and if possible enable it once they exit the application.
Member 11368627 5-Apr-16 3:53am    
FYI..the extension we are trying to load is Downloads – Your Download Box. Want to install this on client browser just for the application.
deepankarbhatnagar 5-Apr-16 3:54am    
Ok

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900