Lock Firebug to a specified page - firefox

Is there a way to keep Firebug on a single page, so that when I switch pages it remains on the page I want it set to?
For example, I'm working on a project and I get an error that I want to search for on Stack Overflow, but when I navigate here, the console changes to reflect this site. I'd like to stop that from happening.

There is no option to "pin" a page's data in Firebug (as of version 2.x). As far as I know this also doesn't work in any of the browser built-in dev tools.
Though the simple solution for your problem is to open the other page in a separate tab or window. Doing so keeps all the data of the page saved when you switch back to the tab containing your project's page.
Note that Firebug's activation model is based on URLs following the same origin policy. I.e. if you open it for your project's page, it will always get opened for your projects page, even on other tabs, but not for any other site.

I've found it useful to split the tab of interest off into a new window and to activate Firebug on that window. That way I can continue using my original tab collection/window without it changing as I link-hop.

Related

How to disable firefox's reader view from my website?

Today i updated my firefox to the latest version and one big feature is the reader view for desktop. We launched a webshop two weeks ago and now there is this tiny "reader view" icon. When i click on it i get an error-message. My team-leader wants me to remove this feature when visiting this site.
is it possible to remove or hide the "reader view" feature from firefox when visiting my site?
There is currently no legit way of disabling Reader View for your website. Reader View is supposed to automatically detect on what pages it should be available and on what pages it should not.
If there is an issue with your website, your best option is probably to report it there: https://github.com/mozilla/readability/issues
You can also find more info about the issues affecting Reader View in Firefox there: https://wiki.mozilla.org/QA/Reader_view
Although I would not recommend it, there might be a way to fool Reader View into thinking it should not parse your website, if you really need to. A quick look at the source code reveals that it will not parse certain type of documents, certain URIs and malformed URLs. You would need to dig in the source to understand how/if your site can safely be adapted to avoid being parsed. The Reader View source code can be found here: https://mxr.mozilla.org/mozilla-release/source/toolkit/components/reader/ReaderMode.jsm or
https://dxr.mozilla.org/mozilla-release/source/toolkit/components/reader/ReaderMode.jsm
This Question shows how to Optimize website to show reader view in Firefox. So you have to ensure that your site is not optimized for the Reader View.
Don't use formatting options that are favoured for the Reader View and so on.
I guess this will suffice:
Don't use the <p> Tag
write all Textblocks in small portions
Here are some more details about the mechanism
Replace p tags with div tags in your page. It worked for me, even when I have div tags with pre tags (preformatted text) on the same page.
There is no way of forcing disabling the Reader View to the user, But if it is important to your site, you can notify the user to disable or not use the reader feature of firefox.
This would be the way to Disable the Reader on the users browser
in the Enter about:config in browser address bar
click the "I'll be careful I promise" box
search for reader.parse-on-load.enabled
toggle preference to false (right click > toggle to false )
close the about:config page > refresh browser > reader view icon has gone
put this code on your css code and you are done !
/* CSS Reset */
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,
p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,
img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,
dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,
thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,
footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,
audio,video,adnav,adheader{
margin:0;
padding:0;
border:0;
font-size:100%;
font:inherit;
vertical-align:baseline;
}

Display of object class in page frame for visual foxpro 6

I've bundle of control save in .vcx file but I need to activate it to display it when i switch to different activepage in pageframe.
Could anyone guide me how to code and which kinds of event should i make on page frame switch, click or whatelse UIENABLEEVENT.
Thanks.
First, you might want to click on Help -> Tour for site etiquette and start voting / checking your answers so people know what worked or not that help you and others with similar issues.
Now, back to you question... If you have a form with a pageframe, make sure you have the "Properties" sheet open, it helps to ensure which object you are actually working with until you get more familiar with the IDE.
Once you click on the pageframe control, if you right-click and then select "Edit", that will bring you to the individual PAGE level of the pageframe. Once the PAGE is the basis of the focus you can put any control on it from either the toolbar, or if your project is open and you expand your .VCX class library, you can grab any control and put in on the page.
If you have multiple pages, once you click on the alternate pages, you will see that the first page (or whatever page) is no longer visible and the new page is available for you.
The actual handling of the pages on the pageframe for clicking / focus is automatically handled for you unless you want to do something extra.

Vimperator/Conkeror-like link selection

I use Conkeror on a daily basis except at work where I need Firebug, since I'm a web developer. I really miss having the "follow link" ability in Conkeror but I don't want to resort to using Vimperator to get it.
Is there any Firefox extension which lets me follow links by hitting a key followed by the link text like in Conkeror?
There are many ways you can already use only the keyboard to browse with Firefox.
Searching pages
The find-as-you-type feature was an epiphany. While Google is great at getting you to the right web page, Firefox's find-as-you-type feature gets you the rest of the way.
Find as you type text: /
Find as you type link: '
Regular old find: Ctrl/Cmd+F
The link search is very useful, especially when used in conjunction with...
Opening pages
Unless you do all of your browsing in one page, these shortcuts are huge when you don't want to go running for your mouse.
Open link in new window: Shift+Enter
Open link in new tab: Ctrl/Cmd+Enter
Open address/search in new tab: Alt/Option+Enter
Used together with their respective shortcuts (address and search bar shortcuts and the find-as-you-type link shortcut), the page opening shortcuts go a long way toward mouse-less browsing.
Of course, you can also use the Mousless Browsing plugin.
Mouseless Browsing (MLB) enables you to browse the web entirely with the keyboard. The basic principle is to add small boxes with unique ids behind every link and/or form element. You just have to type in the id to trigger the corresponding action i.e. following a link, pressing a button or selecting a textfield...
There's Pentadactyl - and all firefox extensions work well with it.
https://addons.mozilla.org/en-US/firefox/addon/8781
Works even better with Linkification, I might add.

Displaying a page in Firefox without opening a new tab

I'm writing an editor that is updating a WYSIWYG view in the browser. As this update can happen often i don't want to open the page in a new tab. Is there any way other then using the ugly way of emitting keystrokes to enter the Open URL command and entering the URL (I'm doing this right now, but it's buggy if the user interacts with the system in the meantime).
I tag this as firefox but comments on other browsers are welcome.
Script given below changes location without opening new tab. I think it would be helpful.
TYPE IN ADDRESS BAR:
javascript:window.location.href = "http://www.yahoo.com";

How do you serve a file without leaving the page?

Aims
I'm trying to let users download a file (myfile.zip in this case) by clicking a button on the page, without them leaving the page - ie the browser must stay on the current page, and leave them in a position where they can continue to use the page, including clicking the button again (should they wish to get a new copy of the file).
I need this to work across all browsers (IE6-8, Firefox, Chrome, Opera, Safari).
Background
Packaged inside the zip is a selection of stuff based on their other interactions (some of which may be partially complete) from the same page (this is all done via ajax) and I don't want them to leave the page as they would lose any unsaved changes.
Add the following header when the download file is served:
Content-disposition: attachment; filename=filename.zip
Most browsers will wait to see what type of thing they are loading before they clear the current page, and if it something that should be downloaded as a file they won't navigate away from the current page (they'll show a Save As dialog in front of the page, which can be dismissed to return to the page).
If however you find that a certain browser does navigate away from the current page, you may try having the link to the download contained in a small iframe, so only that frame changes.
I think it's a better solution to opening the link in a new window, because some browsers will leave the new window up even once it's determined that it is a file that should be downloaded, so you end up with a blank window.
If you make the link open in a new window/tab (e.g. via the <a> tag's target="_blank" attribute), it won't disturb the contents of the current window.
The target attribute is deprecated, but widely supported. Depending on the browser, you may also be able to use the CSS3 target-name property.
If your goal is to absolutely guarantee that the main window is undisturbed, this is likely the safest method, as it's resilient against download errors.
To avoid leaving the page (if you do this the page tries to close itself first, so that it's sure that you've saved everything, and you get warning messages if you haven't) or leaving blank tabs (which I don't like, nor the use of the depreciated target attribute) I've used an iframe, whose src attribute is changed in javascript.
This works everywhere except some versions of Opera, which I have considered an acceptable loss (I might fix that via the use of one of the other solutions plus browser detection later).
I believe if you direct the user to a file and the MIME type is something the browser knows it must download vs render, the browser will not leave the page. For instance if you were serving a zip file the browser would know it was a zip file and prompt for download. But if you were going to serve a zip file from a page request (i.e. /file.aspx?file=myinfo.zip) then file.aspx would need to change the MIME type to be "application/zip" before send back the response in order to prompt the user for the download.
One major caveat here is if the file didn't exist for some reason the user would get a 404 and be directed to the error page.
As a sure-fire way of not redirecting the user you could open a pop-up for downloading.
We do this on postback on an aspx page by setting ContentType to "application/octet-stream", then streaming the zipfile with Response.BinaryWrite(..) and Response.Flush().
Gives the user a popup "do you want to open or save" the file.
Page is still available.
By the way, specifying the appropriate content disposition header alone might not work in all browsers. Specifically, I've seen it not work in Opera, and IE7 displays the yellow security warning bar.
In addition to the appropriate header, as described by thomasrutter, The way I've done this is by using a hidden form:
<form id="download_form" method="get" action=""></form>
When the user clicks a button, you can manipulate the "action" attribute of the form with the URL of the file.
This seems to work in all browsers, even IE7!

Resources