It seems like the link color for pages you visit doesn't change. This does work for links inside the page (e.g. links in the table of contents), they get a darker color after you clicked them, and still have that color after you navigated to another page and back again.
But normal links to other pages are still in the same blue after you clicked them and visited the page.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks. The SWT browser controls color-coding links (a:visited). I believe it color codes any page visited from setURL. Unfortunately XOWA uses setText (setUrl can't be used without setting up a local web-server). As a result, clicked-on pages never enter the SWT's internal database.
I already track visited pages, so I'll have to come up with a new html class that simulates the "visited" color and inject that into the page. I'll try to make a pass at this functionality this weekend, but it will likely not make it into v0.2.1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2013-01-24
The links inside a page behave even more strangly than I thougt:
The are colored visited/not visited only by the name of the anchor, not by the page they are on. So if you click the first reference on a page, then every first reference on any page is colored as visited. The same happens for links in the TOC like "History".
The information is stored somewhere, probably even outside the XOWA folder, as the links continued to show as visited even after I updated XOWA and removed the log files etc. at that time. --Schnark
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The are colored visited/not visited only by the name of the anchor, not by the page they are on.
Hmm... It looks like SWT/Mozilla is caching the links by anchor name only. I searched and can't find anyway to override this behavior.
I'm not sure how I'm going to handle this. I may have to hardcode a color/style for every anchor link to get around it. For example, instead of producing "<a href=Intro>", I'd generate"<a style='color:black' href=Intro>". When the link gets "visited" then I'll have to manually hardcode the color/style to the visited-one. (EX: "<a style='color:red' href=Intro>")
This is a bad hack, but I can't think of any other way, since SWT/the browser controls this behavior directly....
The information is stored somewhere, probably even outside the XOWA folder
Yes, I noticed this while looking at Mathjax. SWT stores internal settings and cookies in /home/your_user_name/.mozilla/eclipse. You can delete the places* and the cookies* files to "reset" the browser.
I'll make a note of this in Help:Privacy. I don't think there's any way to remove this behavior, as the API is limited....
Last edit: gnosygnu 2013-01-24
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2013-01-25
Instead of inline CSS you could use a class and override the standard CSS: Out put unvisited links without any additional CSS. A visited link should be <a class="xowa-visited" href="...">.
In the head you need an additional stylesheet with (I hope I found the correct color codes)
Thanks. I tried to do this on my own, but my CSS skills are just not there. Your solution works perfectly.
I'm going to put your css-snippet into the xowa.gfs for v0.2.2. It'll effectively disable visited colors for all anchors, but I think that is better than having it inaccurately flag all same-name anchors as visited.
I'm hoping to get visited colors into v0.2.3, but it may be v0.2.4 or later... I'd like to get some of the parser bugs fixed, but let me know if this is a nice thing to have sooner than later.
Last edit: gnosygnu 2013-01-26
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2013-01-31
The tab "Page" is now blue when you are reading the article. You have to either add special CSS to make it black again, or limit the CSS to the actual contet. I prefer the latter, as I don't think it is an interesting fact whether you have visited a page linked in the navigation. So the CSS should be
The "Page" link on the tab (next to the "Talk" link) is still colored blue. Just to be sure, I changed color:#0645ad to color:red and the "Page" link is red as well. I've also deleted my Mozilla sqlite files.
Let me know if I'm missing anything. In the meantime, I'll put in your latest "#content" version.
CSS only uses /* */ for comments.
Thanks. I should've known better. Corrected in latest version.
Last edit: gnosygnu 2013-02-01
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2013-02-02
The closing </div> for the <div id="content"> seems to be missing, so the navigation is included in it by accident. It should end just before the navigation. --Schnark
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is fixed for v0.4.0. Links to pages that are in "Page history" will now have a class of "xowa-visited". Note that this does not work for anchors. (an item for a future release)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It seems like the link color for pages you visit doesn't change. This does work for links inside the page (e.g. links in the table of contents), they get a darker color after you clicked them, and still have that color after you navigated to another page and back again.
But normal links to other pages are still in the same blue after you clicked them and visited the page.
Thanks. The SWT browser controls color-coding links (a:visited). I believe it color codes any page visited from setURL. Unfortunately XOWA uses setText (setUrl can't be used without setting up a local web-server). As a result, clicked-on pages never enter the SWT's internal database.
I already track visited pages, so I'll have to come up with a new html class that simulates the "visited" color and inject that into the page. I'll try to make a pass at this functionality this weekend, but it will likely not make it into v0.2.1
The links inside a page behave even more strangly than I thougt:
Hmm... It looks like SWT/Mozilla is caching the links by anchor name only. I searched and can't find anyway to override this behavior.
I'm not sure how I'm going to handle this. I may have to hardcode a color/style for every anchor link to get around it. For example, instead of producing "<a href=Intro>", I'd generate"<a style='color:black' href=Intro>". When the link gets "visited" then I'll have to manually hardcode the color/style to the visited-one. (EX: "<a style='color:red' href=Intro>")
This is a bad hack, but I can't think of any other way, since SWT/the browser controls this behavior directly....
Yes, I noticed this while looking at Mathjax. SWT stores internal settings and cookies in /home/your_user_name/.mozilla/eclipse. You can delete the places* and the cookies* files to "reset" the browser.
I'll make a note of this in Help:Privacy. I don't think there's any way to remove this behavior, as the API is limited....
Last edit: gnosygnu 2013-01-24
Instead of inline CSS you could use a class and override the standard CSS: Out put unvisited links without any additional CSS. A visited link should be <a class="xowa-visited" href="...">.
In the head you need an additional stylesheet with (I hope I found the correct color codes)
Thanks. I tried to do this on my own, but my CSS skills are just not there. Your solution works perfectly.
I'm going to put your css-snippet into the xowa.gfs for v0.2.2. It'll effectively disable visited colors for all anchors, but I think that is better than having it inaccurately flag all same-name anchors as visited.
I'm hoping to get visited colors into v0.2.3, but it may be v0.2.4 or later... I'd like to get some of the parser bugs fixed, but let me know if this is a nice thing to have sooner than later.
Last edit: gnosygnu 2013-01-26
The tab "Page" is now blue when you are reading the article. You have to either add special CSS to make it black again, or limit the CSS to the actual contet. I prefer the latter, as I don't think it is an interesting fact whether you have visited a page linked in the navigation. So the CSS should be
BTW: Some lines below this it says
CSS only uses
/ /for comments. --SchnarkThanks for the instructions. I tried them now, by doing the following
Removing the existing line for "a:link"....
a:link, a:visited {color: #0645ad !important;} a.xowa-visited {color: #0b0080 !important;}
Adding your new "#content" section above.
The "Page" link on the tab (next to the "Talk" link) is still colored blue. Just to be sure, I changed color:#0645ad to color:red and the "Page" link is red as well. I've also deleted my Mozilla sqlite files.
Let me know if I'm missing anything. In the meantime, I'll put in your latest "#content" version.
Thanks. I should've known better. Corrected in latest version.
Last edit: gnosygnu 2013-02-01
The closing </div> for the <div id="content"> seems to be missing, so the navigation is included in it by accident. It should end just before the navigation. --Schnark
Doh! I had all the <div>s neatly indented, and I still didn't notice it.
I confirm that the Page hyperlink now is unaffected by the Css colors. I fixed it now for all .read, .edit and .html
Thanks a lot!
This is fixed for v0.4.0. Links to pages that are in "Page history" will now have a class of "xowa-visited". Note that this does not work for anchors. (an item for a future release)