Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to see number of current lines and total num of lines in the currently displayed page

1 view
Skip to first unread message

V S Rawat

unread,
Jul 24, 2008, 3:43:53 AM7/24/08
to
How to see number of current lines and total num of lines in the
currently displayed page?

Also, even the no. of character that we are on, and total character on
that line?

--
V

LK

unread,
Jul 28, 2008, 11:41:11 PM7/28/08
to

Personally, I would go Select All and then paste all the text into
something like MS Word, or Notepad. I guess there's also View Source.

Why is it so important to know things like this so closely on a
webpage? :/

V S Rawat

unread,
Jul 29, 2008, 5:48:54 AM7/29/08
to


Several websites list their data on webpages. like Who-is website. If I
am doing some work on that data, it is necessary to know the volume of
data that is there. A number of lines would help in knowing the volume
in such cases.

and if you are on some particular line on a page, say downloading mp3
from a long list of downloads, and it takes time while that gets
downloaded and then you start downloading the next one, in such a case,
meanwhile you can go to check the other entries on that page, and come
back to the line number that you were at.

And, then, downloading an html table to excel, we should know the number
of rows that we should allot in excel.

so on.
--

So, I think we should not only have line num, column/ character no.
display in firefox, but we need option to go to a particular line/
column/ character.
--
V

Sanjeet Sodhi

unread,
Jul 29, 2008, 6:05:45 AM7/29/08
to Firefox user help
For tabular data, could you not simply count the rows with in Javascript?

If you were working with the same format of data continually, then
scripting it in Greasemonkey would be a reasonable investment of
time.

> _______________________________________________
> support-firefox mailing list
> support...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/support-firefox
> To unsubscribe, send an email to support-fir...@lists.mozilla.org?subject=unsubscribe
>

David McRitchie

unread,
Jul 29, 2008, 7:26:54 AM7/29/08
to
"Sanjeet Sodhi" ...

>>>> How to see number of current lines and total num of lines in the
>>>> currently displayed page?
>> So, I think we should not only have line num, column/ character no.
>> display in firefox, but we need option to go to a particular line/
>> column/ character.

Well attempting to answer the original question:
Seems to me number of lines is rather meaningless in HTML. You can
count number of words in selection/page (ext/bookmarklet), or number
of printed pages for the web page (print preview).

Word Count Plus :: Firefox Add-ons [experimental]
https://addons.mozilla.org/en-US/firefox/addon/4718
http://wordcountplus.mozdev.org/ (no login needed)

Steve Minutillo :: messy-78 » Word count bookmarklet
http://minutillo.com/steve/weblog/2007/12/27/word-count-bookmarklet

But it turns out that is not at all what you are interested in. You want to
get to a specific point and that is what id tags (fragment-id) are for, but
not all pages use them and you have to use code or an extension to see
the id's. But there is another way and that is to display a document outline.
There are many available but I like this one activated in sidebar with Alt+O (letter).

"Document Map" 0.6.1 (20KB) extension by James Graham
Displays the current page's heading structure in the sidebar, allowing rapid
navigation between...
https://addons.mozilla.org/firefox/475

Since it is marked as not updated, click of the view all versions and get it from
there. So you will have to have compatibility testing set to false in order to
install and use.

--
HTH,
David McRitchie, ***extensions I use are briefly documented on my site***
Firefox Custom: http://www.mvps.org/dmcritchie/firefox/firefox.htm

V S Rawat

unread,
Jul 30, 2008, 3:13:40 AM7/30/08
to
On 7/29/2008 3:35 PM India Time, _Sanjeet Sodhi_ wrote:

> For tabular data, could you not simply count the rows with in Javascript?
>
> If you were working with the same format of data continually, then
> scripting it in Greasemonkey would be a reasonable investment of
> time.

have a look at this wiki page (that I had updated for my fav MD).

http://en.wikipedia.org/wiki/A._R._Rahman_discography#Songs

See this songs table, and the table above that. That is the primary
reason I wanted to know if someone wanted to know how many songs has he
composed, how would they find out. I couldn't it.

most of the visitors would not know about javascript/ gm to find it out,
even if some ready gm script exists at places. for me, instead of
developing a script, I can just copy that part and take it to some
editor or excel and would find it out. but of course, it is not that
easy in all places.

FF giving the current positioning would make it easy.

--
V

V S Rawat

unread,
Jul 30, 2008, 3:26:53 AM7/30/08
to

yeah, I could install it in ff3.

Though it is not what i was looking for, it is indeed quite useful in
seeing the page structure in a sidebar and then clicking on a like in
that sidebar takes me directly to that position in page. Makes browsing
of long pages very easy.

thanks for the tip.

If the author is reading this, please update this extension and add more
features. One great feature to add would be to allow us to copy the
entries from the sidebar to save somewhere, may be show line nums with
each entry, may be make it clickable link (it already is).

thanks.
--
V

David McRitchie

unread,
Jul 30, 2008, 11:15:19 AM7/30/08
to
"V S Rawat" ...

> David McRitchie_ wrote:
>> "Document Map" 0.6.1 (20KB) extension by James Graham
>> Displays the current page's heading structure in the sidebar, allowing rapid
>> navigation between...
>> https://addons.mozilla.org/firefox/475
>
> If the author is reading this, please update this extension and add more
> features. One great feature to add would be to allow us to copy the
> entries from the sidebar to save somewhere, may be show line nums with
> each entry, may be make it clickable link (it already is).

Mentioning line numbers again; where in Firefox do you see any mention
of line numbers, they are meaningless. In fact even if you meant source line
numbers, you won't get agreement between listings of source of same page.

The list is created on the fly, from heading levels, there are no actual HTML links,
in fact most people aren't even using id="xx" so you can link to a specific heading,
please don't ask for more features to make a great extension become bloated and useless.

Yes the author should update the version number, even though I think it is
nonsense if nothing was changed in Firefox to make it not work. Changes have been made
to make it easier for the author to simply update the version, but I'm sure the process
will change when more authors of the best extensions are no longer around. Really
more of a Firefox issue than an author issue. You use all kind of ancient applications
including command line instructions and even though operating system has changed
the old things still work as long as they did not violate interfaces.

V S Rawat

unread,
Jul 31, 2008, 4:17:30 AM7/31/08
to
On 7/30/2008 8:45 PM India Time, _David McRitchie_ wrote:

> "V S Rawat" ...
>> David McRitchie_ wrote:
>>> "Document Map" 0.6.1 (20KB) extension by James Graham
>>> Displays the current page's heading structure in the sidebar, allowing rapid
>>> navigation between...
>>> https://addons.mozilla.org/firefox/475
>> If the author is reading this, please update this extension and add more
>> features. One great feature to add would be to allow us to copy the
>> entries from the sidebar to save somewhere, may be show line nums with
>> each entry, may be make it clickable link (it already is).
>
> Mentioning line numbers again; where in Firefox do you see any mention
> of line numbers, they are meaningless. In fact even if you meant source line
> numbers, you won't get agreement between listings of source of same page.

I have no reason to bother about what is in the source.

FF can just have some method of displaying a line num on each line of
the displayed page. It need not affect the source.

Just like MS Word and various text-html-script editors have an option to
just display a line num at the start of every line. it doesn't go in the
actual text/ html/ script.

>
> The list is created on the fly, from heading levels, there are no actual HTML links,
> in fact most people aren't even using id="xx" so you can link to a specific heading,
> please don't ask for more features to make a great extension become bloated and useless.

It wouldn't.

>
> Yes the author should update the version number, even though I think it is
> nonsense if nothing was changed in Firefox to make it not work. Changes have been made
> to make it easier for the author to simply update the version, but I'm sure the process
> will change when more authors of the best extensions are no longer around. Really
> more of a Firefox issue than an author issue. You use all kind of ancient applications
> including command line instructions and even though operating system has changed
> the old things still work as long as they did not violate interfaces.
>

I have compatibility switched off, so my ff gives me option to Force
Install.

I agree with you that it is more of a ff issue than extension authors'
issue. ff should evolve method to see whether an extension is altering
some code beyond its scope and should just allow if it doesn't. then the
extension "valid for such and such version" would not be required.

Also, ff should allow other persons to upload the revisions of
extensions as long as it just involves changing the version number.
Maybe ff could authorized selected users on some criteria to do that.

It was a very fine point that extension authors are not immortal. And
several loose interest in their extensions, several get occupied in
something else. ff developers should think of a way to take care of such
eventuality.
--
V

David McRitchie

unread,
Jul 31, 2008, 10:02:09 AM7/31/08
to
"V S Rawat"
> Just like MS Word and various text-html-script editors have an option to
> just display a line num at the start of every line. it doesn't go in the
> actual text/ html/ script.

That applies to a hardened printable copy of a MS Word document.

How does that apply to an HTML document. If you change anything
your line numbers would be different. Name any browser that shows
line numbers, it is not part of html, sure you could take an HTML document
and place line breaks and permanent line numbers and use HTML to display
that document, but that would not be the original, nor a normal HTML document..

With hard line breaks, your document might wrap lines but the actual line number
would have to be part of the document. I can guarantee that none of my
web pages have such line numbers included for display output, and I doubt
that any significant quantity of HTML documentation exists that is not done
for legal purposes and as such would be subject to severe restrictions on changes.

What you see is dependent on:
- width of window
- font and size, foundry of font, operating system
if you had a Mac you could control kerning yourself
- print driver, and they control what you see on screen
- margins
- zoom level


V S Rawat

unread,
Aug 1, 2008, 1:18:32 AM8/1/08
to
On 7/31/2008 7:32 PM India Time, _David McRitchie_ wrote:

> "V S Rawat"
>> Just like MS Word and various text-html-script editors have an option to
>> just display a line num at the start of every line. it doesn't go in the
>> actual text/ html/ script.
>
> That applies to a hardened printable copy of a MS Word document.

yeah, somehow that limited paradigm has become prevalent.

>
> How does that apply to an HTML document.

by just showing a line num at the beginning of each physical line.

> If you change anything
> your line numbers would be different.

of course. Then, display new line numbers as per new display.

> Name any browser that shows
> line numbers,

Sadly, no one that I am aware off.

> it is not part of html,

need not be.

when editors display line nums, that doesn't become part of the text
being edited.

> sure you could take an HTML document
> and place line breaks and permanent line numbers and use HTML to display
> that document, but that would not be the original, nor a normal HTML document..

nopes. that will be very difficult because every time we change font
name/ size, even screen size, or in a text area we edit/insert edit text
in between existing text, that line number will change. We would never
be able to show the line num in live correct count.

>
> With hard line breaks, your document might wrap lines but the actual line number
> would have to be part of the document.

no, that would be wrong to do.

> I can guarantee that none of my
> web pages have such line numbers included for display output, and I doubt
> that any significant quantity of HTML documentation exists that is not done
> for legal purposes and as such would be subject to severe restrictions on changes.
>
> What you see is dependent on:
> - width of window
> - font and size, foundry of font, operating system
> if you had a Mac you could control kerning yourself
> - print driver, and they control what you see on screen
> - margins
> - zoom level

see the image at http://www.freeimagehosting.net/image.php?ec19bec63b.jpg

Similarly, when you can show entire bookmarks, history and many things
in left pane, even split screen, even have frames, everything that
doesn't become part of html, I think you can surely steal a small column
strip in firefox window and show physical line nums as per the correct
resolution/ pixel/ font name/ size/ zoom, etc. It wouldn't go to the
html being displayed. It will not change while you are inserting
deleting existing text in a text area because that doesn't change
physical line nums. But any time we give commands line font that effects
in changing the physical lines, the new line nums are to be displayed.

If there are many frames, many cells in a table all in different fonts,
then it will be complex where to show. I think where it can't be shown
should not stop it from getting shown where it is possible.

--
V

David McRitchie

unread,
Aug 1, 2008, 11:41:19 PM8/1/08
to
"V S Rawat" ...

> when editors display line nums, that doesn't become part of the text
> being edited.

You can count things within HTML but row numbers is not HTML,
and browsers aren't editors, don't know if this would be of interest, it puts a link count number
into the display. http://numberedlinks.mozdev.org/


V S Rawat

unread,
Aug 2, 2008, 11:29:19 AM8/2/08
to

Hmm. Interesting concept. But, no, it doesn't serve the purpose.

thanks.
--
V

0 new messages