Chrome NPAPI method for making it downloading url - plugins

I've recently got into using FireBreath for some simple task: download a clicked url. Is there a built-in method or something else with which i can add the url to Chrome's native download queue? or at least load up a Save Link As.. dialog (that would be ok too)?

You can show a save dialog by using the native OS calls to do so; for example, on the Mac you'd use NSSavePanel. That won't hand the download off to the browser though, it would just give you a user-selected filename to download to. You'd still have to do the download yourself.
NPAPI doesn't have a way to tell the browser to start a download using its UI. That would be something that would be an extension API if it existed (and what you'd want to file a request for if it didn't), not part of NPAPI.

Send the following HTTP header along with the content.
Content-Disposition: attachment
Optionally with ; filename="filename here".

If you want to download a clicked URL with FireBreath then you're not going to get a download dialog; if you need a download dialog, why are you using FireBreath?
The easiest way to get a download dialog is to set window.location to the URL you want to download and wait for the browser to pop the dialog up itself; you can do this with FireBreath or with javascript, it works the same way.

Related

How do I rewrite URL to drop file extension for pdf on github pages?

Imagine my website is hosted on GitHub Pages and has a custom domain website.com. I can access a pdf at website.com/mypdf.pdf
Is there a way where I can make it work at website.com/mypdf?
As mentioned in comments, if you are using static website hosted by a 3rd party like GitHub pages, you don't really get a lot of control over http server. I would tentatively say you cannot control URL rewrite rules on GitHub.
What you could potentially do instead is to host a page with a bit of JavaScript that would start the download on a given event (button click, page load, etc) this way you could mask your actual download URL with this html page (that by convention comes with no file extension)
UPD: and surely enough someone's been doing it already: http://lea.verou.me/2016/11/url-rewriting-with-github-pages/. The post is going on about having nice urls, but I believe file downloads implementation can be implemented similarly
Yes you should make your website with MVC structure. Make a controller and in Index action load pdf file.
Then on action calling your pdf will be loaded like that:
Students/AllResult etc

pdf download not working on Android with cordova inappbrowser

In my cordova inappbrowser app, pdfs can be downloaded by calling a RESTful service that streams the content to the user's browser (see html snippet below). This works fine on iOS and using Google Chrome directly on Android but not when doing it through cordova inappbrowser. Clicking on the link doesn't do anything. I've tried many of the suggestions here including using gview but no result.
The tag in html is an href (I tried using window.open as well) that evaluates to something like https://xxx/member/get_pdf/217521359ashr868af6as. Using target='_blank' (tried _system also)
where the value after get_pdf is a guid (value above is not the real guid)
The google viewer workoaround that many people propose works fine with a physical pdfs but my files are streamed back from the service above and gview doesn't recognize it as a pdf and shows error 'preview not available' and its not an option to store them physically. Is there some specific header to set to make gview recognize the streamed response as a pdf? I set content_type, Content-length, tried adding Content-disposition with a filename also. No go.
Any suggestions appreciated.
Thanks,
Patrick

how to send facebook message automatically without api

guys
now i knew how to send message without using facebook api,
i could use url to fill the message textarea in facebook's website
www.facebook.com/messages/[user_id]?msg_prefill=XXX
but here i'd like to know how to send this message automatically
in April, i found a way to click "send" button automatically (find "send" button in html text and click it),
but now facebook hide theses html text so that i can't find this button in html text.
Therefore, can anybody provide some ways or point to send message automatically.
thanks
Use the console in you browser (usually F12 to open) firefox console is the most powerfull, your console should have a command like "element inspection" or similar, use this tool to analize the button you want, read ing the code you should find someting like "on click" or simsimilar, after this you will find a java command to push the button. Anyway to do this kind of stuff without being a programmer,use selenium IDE, very easy,only for firefox,you must download it from firefox as add on. Good luck!

Tracking Download for enterprise iPhone/iPad application through itms-services

I am using itms-services to download enterprise iPhone/iPad application. We want to track who has downloaded what application when the user clicks Download button.
As prompt to Cancel/ Download is coming from itms-services not by our application, we are finding difficulties to track that download click event. Can anybody give any way out to solve this problem.
As far as I know there is no way to intercept the Cancel/Download from this IOS prompt. The only way to ensure that you know that a download has occurred would be to have the file server detect the download of the entire file. Even then, it is possible that a user could "cancel" the download near the end, or if the file was built incorrectly (i.e., profile is invalid) that the load to springboard is incomplete.
If you use a system like EASE (Enterprise App Services Environment) [http://www.apperian.com/ease], it provides this type of information based on the completion of file downloading and has reporting. EASE is free to developers using ad-hoc deployment so if you are trying to distribute apps this might be an option for you.
Can you check your web access log of .ipa? It'll give you rough idea of how many downloads.
You could write JavaScript code that:
contacts google's tracking services, and then
changes the window.location to your iTMS-services link.
Had the same problem, here is my working solution. This logs the enterprise download click to google analytics.
<!-- Users click on this install link -->
Install App
<script>
var trackOutboundLink = function (url) {
ga('send', 'event', 'Download Page', 'User Clicked Install', url, {'hitCallback': function () {
window.location.href = url;
}
});
};
</script>

Define custom User-agent header in the HTTP request?

I would like to get a glimpse of web-sites created for iPhone devices. In order to be able to view those sites I have to modify the User-agent header in the HTTP request that my browser sends. That way I can trick the web-server into believing that my browser is an iPhone browser, and then the web-server would send my the iPhone version of the web-site.
So, how can I modify the User-agent header that my browser sends in each HTTP request.
Maybe there is an Firefox plug-in that allows modifying request headers?
Also, I think I heard that Safari allows that somehow....
You can try the user-agent switcher plugin.
Yeah you can do this with Modify Headers add-on for Firefox.
First, there's the following plugin: https://addons.mozilla.org/en-US/firefox/addon/59/
Also, there's Firefox configuration: type "about:config" as URL in Firefox, find general.useragent.* properties there.
You don't need a browser add-on in order to add a custom User-Agent string in your HTTP header. Chrome has added this feature to developer tools.
Open the developer tools and click on the Toggle Device Toolbar option or press cmd+shift+M to open it. You can select a device user agent from the presets or you can also define a custom device like mentioned in the below screenshot.