Using a local html file as the new tab page in firefox - firefox

I'm using Firefox 44.0 for Windows, and would like to use a html file hosted on the file system as the page that appears on a new tab page - it contains links and other resources that's useful for my workflow.
I'm using the "New Tab Override" plugin for FF which essentially restores the browser.newtab.url option. I get my local html file showing when I create a new tab page.
However, the problem is that the path to the file appears in the url bar so that whenever I start typing a url in the url bar (from when I want to go to a known location in the new tab), it's appended to the filepath, instead of replacing it.
Is there another way I can show a local file as a new tab whilst leaving the urlbar blank so I can type urls in when desired?

No sooner than I posted after thinking I'd set it up properly, by changing the newtab.url option from 'home page' to 'custom url' and then entering the path to the html file, the url is highlighted on a new tab open so typing a new url will overwrite the existing location. Sorted!

Related

How do I disable dynamic page titles or the blue notification dot in Firefox for specific domains?

Firefox perpetually displays a blue dot notification for pages where the title constantly changes. This is particularly annoying for pages like TradingView or GDAX, where the title changes constantly with price updates. On the other-hand, this is extremely useful for pages like Gmail. So I don't want to disable it across the board - just for specific domains.
I would normally just go back to Chrome, but Firefox 57 is so much faster on my MacBook.
How do I disable dynamic page titles or the blue notification dot in Firefox for specific domains?
I solved it like this for Stack Overflow's website:
Open about:config in Firefox
Search for the toolkit.legacyUserProfileCustomizations.stylesheets and set it to true
Open your Firefox profile folder (under Settings → Help → More troubleshooting information → Profile folder → Open folder)
Create a new folder chrome and within this folder a new file userChrome.css
Open the new file and paste the following content into it:
#-moz-document url(chrome://browser/content/browser.xhtml) {
.tabbrowser-tab[label*="Stack Overflow"] > .tab-stack > .tab-content[pinned][titlechanged]:not([selected="true"]) {
background-image: none !important;
}
}
Restart Firefox
The CSS selector [label*="Stack Overflow"] needs to match the title of a browser tab partially. If you omit it, the blue dot will be disabled globally for all tabs.
Credits go to these sources:
https://www.userchrome.org/how-create-userchrome-css.html
https://support.mozilla.org/en-US/questions/1270061
https://support.mozilla.org/en-US/questions/1181537
Write an extension or userscript that prevents the title from being modified, e.g. by replacing the setters on the title element and its text content node with noops.
Note that you will have to access the untrusted page context to do so, since extensions run in a a separate context.

Load PDF file in codeigniter

I want to load a pdf file located in upload/grilles/ where upload is located in the root.
My code:
<?php echo $nomFichier; ?>
When I click in the link, codeigniter doesn't want to display the document unlike in a site without framework that display.
Why?
Thanks !
This is not a codeigniter problem, but a browser (Firefox) issue.
I'd recommend the PDF.JS library, which is a general-purpose, web standards-based platform for parsing and rendering PDFs.
note: your above example behave (checked on localhost ) in other browsers than FireFox as follows:
Chrome Version 34.0.1847.137: shows pdf in new window right away
IE 11: asks for permission to show the pdf, if granted shows pdf in new window right away
Safari (for windows) 5.1.7.: shows pdf in new window right away
Opera 12.11: shows pdf in new window right away
So....
It's just my URL.
The file name contains a space, but I injected the name in the url which gave:
localhost/xxxx/yyy/file%20test.pdf
but the url's file is:
localhost/xxxx/yyy/file_test.pdf
Sorry for the inconvenience

dynamic development with firefox

I am following a toolbar tutorial for firefox and i am unable to develop dynamically. I have changed the "install.rdf" file names with the .com and without the ".com". I have created a separate development profile as well. I created a text file with matching names in the tag. The text file contents had the absolute path of the folder. i placed it into the extension folder which is located in the profile. I started firefox but nothing happened. Noh toolbar was displayed. Can anybody help?
The link of the tutorial i am following is http://www.borngeek.com/firefox/toolbar-tutorial/chapter-4/
I cannot move forward without getting this working

Display HTML content in a new tab from global.html in Safari Extension

i am creating a safari extension in which i need to create a new tab and display some html content in it...i am able to open a new tab using
var newTab = safari.application.activeBrowserWindow.openTab()`
but i am not able to set the html content...is there anyway i can do that
Thanks in advance
You can load a local HTML file (in the extension package, not the computer's file system) which might already contain the content you want.
var newTab = safari.application.activeBrowserWindow.openTab();
newTab.url = safari.extension.baseURI + 'example.html';
If you need to add content after loading the file, and the content to add resides in the context of the global page, you can use the messaging system to transmit the content to the page in the tab. See this page in the Safari Extension Development Guide.

Display csv inside firefox browser

I need to open a csv file within firefox. By default, it asks me to choose a download location or to open it with an external program. However, regarding the context, I have to display it straight away inside the browser as plain text, without passing by the popup screen which asks me what to do with the file.
I tried to tweak the Firefox "mimetype.rdf" in order to force the content type "text/csv" to be opened in browser. However, I don't find much information about this file, so I was more or less guessing... This is what I came out with:
<RDF:Description RDF:about="urn:mimetype:text/csv"
NC:value="text/csv"
NC:editable="false"
NC:description="CSV page"
NC:fileExtensions="csv">
<NC:handlerProp RDF:resource="urn:mimetype:handler:text/plain"/>
</RDF:Description>
My idea was to force firefox to treat text/csv as text/plain. This code does not work. But anyway, I managed to force content type using "Mason" firefox extension. However, when the browser sees it as a text/plain, it propose me to open it with notepad or download, does not help me much.
I tried other content types, the text/html, text/xml, it always asks me to choose an external application or download.
I tried to use several extensions, "openInBrowser" and "ViewAsText" make me able to do what I want, but I have to explicitely go in a menu and click the "view as text in the browser", no possibility to set a behavior for the content type "text/csv".
How can I explain that I want all the "text/csv" to be opened inside firefox by default?
Any idea?
Thanks
You could have an upload field where the CSV file gets uploaded to the server. Using server-side code (ASPX for example) you could upload the file, then read the contents of the CSV file and display the results using a Response.Write to the browser.

Resources