HTML, CSS, JS and other unsorted stuff

cleanPages Extension - an arc90 Readability conversion

, , , , ,

Outdated.
For discussions about cleanPages v 1.5 please visit the new service page


cleanPages improves the readability of webpages by removing unnecessary clutter. It enhances the layout and combines multi-paged articles into one. It works on locally saved pages and in offline mode, too. cleanPages is a multi-lingual derivative work based on the code of the Arc90 labs experiment "Readability™".


cleanPages is NOT an adblocker or scriptblocker; it cleans pages for reading or printing after they have been loaded.

Version: 1.0.2
Download from the addons page: cleanPages
Supported Languages: English, French, German, Italian, Polish, Portuguese, Russian, Turkish and Swedish.

Latest test version:
1.5.54
Warning: May be unstable!
Date: 2012-07-10 17:23 GMT+2
Download from my private server: cleanPages.oex
A warning will be displayed, you'll have to trust me wink

Snapshot users:
Please add http://quhno.internetstrahlen.de to the trusted repositories.
Menu -> Settings -> Preferences -> Advanced -> Security -> Trusted Web sites (Trusted Repositories Tab)

Known issue:
In the latest Opera snapshots sometimes the settings will be lost after an Opera restart. Not my fault, other extensions suffer under the same issue, it is an Opera bug (CORE-47777).

Changed in the Alpha (latest changes on top):
  • kill setInterval() for merged pages too
  • prevent set click event listeners on body or documentElement from bleeding into the cleaned page
  • removed independent setting for line-height because of bug DSK-344053
  • kill scripts that are started by setInterval() too
  • cleaned upt settings page
  • Some minor fixes for hidden contents - now they should stay hidden
  • Fix for headlines: Big justified text looked ugly, changed to pure right or left align. Known problem: Wrong align on RTL (Arabic or Hebrew) headlines and text align justify or center, please select text-align right when reading these.
  • Fix for content images when screen is very narrow. restricted maximum width to text width.
  • Experimental change of the content image detection heuristics
  • Deleting non displayed content, i.e. content with display:none, visibility:hidden, opacity:0
  • Added Italian translation
  • "edit" links in most Wikis will be removed
  • Added Turkish translation
  • Switched off pagination for sciencesetavenir.fr
  • Squashed bug where too long entries in the color input fields failed to update the preview
  • Prepared internationalization of the preferences page
  • Added Russian help
  • Added help localization structure and German help page
  • Extension's button can be hidden (see help page)
  • the 3 tool buttons top left in the page are now hidden by default.
  • Added Help page
  • Changed the way the CSS is applied, should be more robust now.
  • Extension resets itself to default values after a fresh install.
  • added setting for uncolorized black background around the cleaned text.
  • added some options to the preferences page: show images, show vimeo and youtube videos, merge paginated pages
  • Workaround for Opera CORE-23171 bug
  • Options styled and some minor changes
  • Mouse gesture support - (see help file)
  • Faster reload
  • Added Ctrl+Shift+R as keyboard shortcut to start the extension and to reload the original page
  • New icon
  • Extended font support. Detects installed fonts from a list of 509 of the most common installed fonts on your computer.
  • Added autoscrolling feature, watch the upper right corner.
  • New settings page
  • Bugfix: Additional footnote anchors in text if the button was clicked more than once. (see details)
  • Improved the next page detection but there are still some quirks left (at least I hope id didn't break it too much)
  • Bugfix: elements styled by <u><b> were removed including their contents.
  • Improved duplicate pages detection on multi page articles - should work now correctly with my.opera blog articles with more than one comment page too.
  • changed width setting to fixed values and a percentile maximum width to avoid horizontal scroll bars if set too wide if the window width is changed afterwards.
  • experimental fix for H2s abused as intro

Known issues of the Alpha
  • line height changes are only applied after window size change or setting of font size or spacing in 11.50+. Not my fault, reported as Opera Bug DSK-344053
  • No internationalization for the help page
  • Opera 12 sometimes doesn't want to clean the page again on pressing the extension's button after a previous cleaning attempt on the same page. They broke it. Use CTRL+SHIFT+R instead, that works reliably.
  • Several more issues wink Please post major errors you encounter in the basic functionality here in the blog comments. Thank You!

Usage
If the extension's button is active, you can click on it to change the layout of the active tab's content - or you can select some text (300+ characters) and click the button to make that text readable. If you selected too little text, cleanPages switches back to the default mode and tries to find the relevant content on its own.

cleanPages shows 3 buttons on the cleaned webpage:
  • Reload: It has basically the same behavior as the normal reload button in the browser. It is a true reload except when used on frame sites, then the history is used to go back to the same subframes as before. (Read about History Navigation Mode quirks below)
  • Print: Opens the Print dialog to print the cleaned page. Text will be black, backgrounds will be white, the buttons will be not printed.
  • Email: Opens the default email client on your system with the page's URL as body text. Feel free to edit subject and body text to something more meaningful than the included default text. wink


Preferences | Options
cleanPages comes with settings for Style, Size and Margin. Style changes the font and the background color, Size the font-size, Margins the margin between the displayed text and the container. The container is centered in your viewport and can adapt to its width to avoid horizontal scrollbars, if the viewport is smaller than the container's maximum width of 1000px. The Margin setting puts a margin between the (invisible) border of the container and the text, meaning: The width of the text part shrinks if the margin is set to bigger values.

To set up the extension's preferences:
  • Right-click the button of the extension
  • Choose "Preferences"
  • On the preferences page, change the settings in each column at least once and tick or untick the "... footnotes" checkbox. This makes the settings permanent as long as the extension is installed (only necessary after a new install, later you can change each setting individually).


You can see a preview with sample text in the "Example" box below the settings. The settings can be changed again any time later by re-opening the "Preferences".

Supported Languages
cleanPages comes in:
English, French, German, Italian, Polish, Portuguese, Russian, Turkish and Swedish.
The language is set according to your browser language settings and defaults to English for languages not yet supported. The functionallity of cleanPages is independend from languages, one of my test users reported, that it works just fine on Japanese pages.

Please send me a personal message or leave a comment here, if you can and want to translate it into your language.

Changes to the Original Readability™
  • Added multilingual preferences and user dialogs.
  • Fixed some frame issues. Overwriting or replacing the body of the top document in a frameset is not allowed in Opera because of security restrictions.
  • Removed included Typekit fonts. I have no license to use them and I don't intend to buy one.
  • Removed original JS smooth scrolling. Operas built in is good enough. Use [space] to scroll down a page and [shift]+[space] to scroll up a page.
  • Reactivated the Terminal style.
  • Removed the Athleas style.
  • Improved the font stacks for cross system use.
  • Removed bad browser sniffing because Opera can mask as IE. That wouldn't have worked out. wink
  • Removed or replaced Firefox-only code. (read: Firefox only Bug workarounds for not following the W3C specifications lol)

Various other fixes, see source code of the included script. All changes are marked with /*q ... */


Known Issues
The description is not multilingual. Not my fault, kick Opera for that, especially the person who wrote the parser that checks the config.xml during the publishing process for validity. It doesn't even respect their own specifications. sad

cleanPages, like the original "Arc90 Readability™" bookmarklet, does not work well with:
  • Start pages of a website. Navigate to an article page before you use the extension. I will not change that, my version of cleanPages should stay a small extension with a low system impact. If you think otherwise: feel free to edit it, it is licensed under Apache 2.0 wink
  • Pages with not enough text to analyze. Not possible. No way.
  • Pages with crappy markup. It will do the best it can.
  • Some kinds of frameset pages. However frame pages without forced frame reload should work fine.
  • Pages that are reloaded with Unser Prefs|History Navigation Mode set to "Auto" (1, default) or "Fast" (3). It works better when set to "Compatible" (2).

To switch between all 3 settings you can use this button:
History Navigation Mode

Further known issues: I hope not wink

cleanPages comes AS IS, meaning:
I won't fix mistakes that other people made on their websites. If it works, it works. If not and if it is my fault, leave a comment below.
If you find any real bugs, please post them in the comments, too.
If it destroys your hard-disc and melts your processor: Buy a new computer p

Legal Stuff
"Readability™" is a Trademark of Arc90, http://arc90.com
Permission to use the code was granted by license and email.


    Outdated.
    For discussions about cleanPages v 1.5 please visit the new service page

    Besinnlichkeit ...Error correction ...

    Comments

    QuHno Saturday, April 28, 2012 2:54:18 PM

    Version 1.5.33

    Cleaned up the help page
    Added German help.

    To all volunteer translators:
    If you like, you can start translating now.
    Please unzip the extension, open the help.html file in

    locales/(yourlanguagecode)

    replace all the English text between the > and the <
    zip this file only (not the whole extension) and send it as attachment to my opera mail account - best by just clicking on the message button on the about page of this blog.

    Please don't change the encoding of the page. It is stored as UNIX UTF8 file, good text editors like Notepad++ should recognize that automatically.

    If you like, you can change the text for your language in the config.xml too. If you do so, please put that file into the same zip as the help.html too.

    As last favor I need these two sentence from the settings page in your language:

    "Please press the reset button if the settings are garbled. Help and additional options"


    Please refer to the English or German texts, because I have changed some sentences. Feel free to translate the meaning, not too literal, reading the text should be fun and not too technical, at least where possible.

    QuHno Saturday, April 28, 2012 10:43:34 PM

    Version 1.5.34

    Russian help file added

    A big Thank You to TiRANiD smile

    QuHno Sunday, April 29, 2012 4:20:03 PM

    Version 1.5.36

    Prepared translation of the options page.
    added Russian and German translation to the options page

    If you want to translate it into your language, here the structure of the code:

    EDIT:
    You can cownload all files that need to be translated here:
    http://quhno.internetstrahlen.de/myopera/extensions/cleanPages-lang.zip


    The description does not need to be literal, it just has to work in your language. Please don't translate the term "Readability™" and "Arc90 Labs Experiment" because both are trademarks of the company that developed the original algorithm that I used (heavily modified) as basis for this extension and please don't change the encoding of the files, they need to be UTF8 or I get big problems with the different charsets.

    Just replace the English strings on the right side with your own and send it to my my.opera mail address.

    kapsi Tuesday, May 1, 2012 11:00:45 AM

    Now there's no margin between the text and the black frame.

    QuHno Tuesday, May 1, 2012 12:19:39 PM

    Oh, there is a margin - but there was no padding, someone deleted it bigeyes bigsmile

    fixed

    Version 1.5.37

    QuHno Tuesday, May 1, 2012 6:39:35 PM

    Version 1.5.38

    Polish translation added
    fixed the width issue of the reset button (I hope)

    TiRANiDTiRaNiD Tuesday, May 1, 2012 8:03:44 PM

    Yes, the width issue is fixed.
    And since there's "Сброс" and not "Сбросить" written on the button I think you may need to change this word in my translation too.

    It should be "Нажмите кнопку "Сброс", чтобы вернуться к настройкам по умолчанию. Страница помощи и дополнительные настройки"

    This phrase in at the bottom of the main settings page.

    QuHno Tuesday, May 1, 2012 8:20:43 PM

    Thanks, all three (in the help too wink) occurrences of "Сбросить" will be replaced by "Сброс" in the next version smile


    BTW:
    I think I am on the track why the button doesn't want to work sometimes when you click multiple times on the same page - it seems to bite with some injected iframes, namely but not alone from Facebook and Google, that can steal the "focus" of the script, despite the fact, that it shouldn't work at all in iframes. I don't know yet if it is a bug in Opera 12 or if they deliberately changed something, but I'll try to circumvent it if possible.

    It seems that using the Ghostery Extension in combination with CP can mitigate the effect, at least as long as the injected "+1" and "like" button scripts are blocked.

    The keyboard shortcut and the mouse gesture should work fine in all cases, even if the button does not want to work.

    There seems to be another issue too, may be someone reading here has a solution:
    I can't disable the button in 12, like I can in 11.62 - meaning: It should be inactive and shown as inactive, as long as the page is not fully loaded and in focus.

    The crapDimmer extension has the same problem too, despite the fact that the code for the button stuff is almost the unchanged code taken from the dev.opera.com pages ...

    TiRANiDTiRaNiD Tuesday, May 1, 2012 9:09:57 PM

    Originally posted by QuHno:

    It should be inactive and shown as inactive, as long as the page is not fully loaded and in focus.


    For me it's better if it works the way it works now, because sometimes I don't want to wait till a page is loaded - I stop it from loading as soon as I see that the needed part has been loaded, for example an article or another bulk of text.

    QuHno Wednesday, May 2, 2012 2:04:59 PM

    Nope, that has nothing to do with the issue, at least not directly.

    If you stop loading a page, you actively set the page to the loaded state, (meaning: the load event fires and CP can read the event) and you actively focus the tab - but there are situations where the extension is not ready, at least not to be used with the button, so for me it is an issue, even when I don't know yet what to do against it smile

    TiRANiDTiRaNiD Friday, May 4, 2012 3:19:07 AM

    Hello!

    There are still some 'text-decorations'.

    Here - http://www.sciencesetavenir.fr/sante/20120503.OBS4586/courir-allonge-la-vie.html

    Screenshot #1 - http://files.myopera.com/TiRaNiD/files/snip_Capture.PNG - Original text isn't decorated

    Screenshot #2 - http://files.myopera.com/TiRaNiD/files/snip_Capture2a.PNG - It is decorated in cleanPages

    TiRANiDTiRaNiD Friday, May 4, 2012 3:43:00 AM

    BTW, I noticed that cleanPages loads a second page - which is Always the same ! - no matter what article you choose on this site:

    http://www.sciencesetavenir.fr/

    And I can't even find the link to this article (which is loaded as the second one) on the site to manually open it.

    Screenshot - http://files.myopera.com/TiRaNiD/files/snip_Capture3.PNG

    QuHno Friday, May 4, 2012 7:21:39 AM

    Originally posted by TiRaNiD:

    There are still some 'text-decorations'.


    Short explanation: They are a H4 (Headlines, 4th order) and to distinguish the different levels of headlines, I used the style
    h4{font-style:oblique;}


    They semantically abused the H4 (H3 would have been the correct choice) and set it to display in small and bold. I could change the CSS, but I don't know if I want to do that because visually differentiating between a H3, H4 and H5 could be difficult with some fonts if it depends on the font size alone.

    Originally posted by TiRaNiD:

    http://www.sciencesetavenir.fr/


    But you've got the warning that cleanPages doesn't cope well with front pages? I hope I didn't write that in vain p

    Here it displays exactly the text content of the page. cleanPages does not care if some content is visibly hidden but looks for text inside of tags in the source code. The first paragraph's text in the source code looks like this:
    La r&eacute;apparition d&rsquo;habitats oubli&eacute;s et la r&eacute;surgence d&rsquo;esp&egrave;ces invisibles depuis des ann&eacute;es constituent l&rsquo;un des effets inattendus des catastrophes naturelles.

    and I get this as first line in the cleaned content:

    La réapparition d’habitats oubliés et la résurgence d’espèces invisibles depuis des années constituent l’un des effets inattendus des catastrophes naturelles.

    This looks perfectly fine to me.

    QuHno Friday, May 4, 2012 7:41:21 AM

    additional to the frontpage:

    they pack an anchor (link) inside a H2 inside a div. Then the div is closed and after that a paragraph starts. That is one of the best ways to get the H2 content killed by cleanPages.

    To differentiate between navigation an text the heuristics looks for a high text to link text ratio (in this case the text to link text ratio is 0:1 = Kill it) then for a certain length in the block level elenemts and the parents of the block level element. OK, the H2 has enough text, but it is enclosed by a div, that means the div itself has no additional text and doesn't get a high enough rating because parent elements get only the half rating of their child elements to avoid blurting out to the whole page.

    A completely different text recognition algorithm would be needed to capture this kind of pages - or a webmaster that doesn't pack absolutely unnecessary div elements around single H elements.

    The server based solution of Readability copes a little bit better (click at the readability link at the top of the page), but that is no surprise: They can look up problematic site structures in their database which I can not ...

    TiRANiDTiRaNiD Friday, May 4, 2012 11:09:26 AM

    Originally posted by QuHno:

    http://www.sciencesetavenir.fr/


    Of course I didn't try to apply the style on the front page.

    The link is just the hint that "the second article" (which has no connection to the previous article, whatever article is chosen) is loaded on any page on this particular site. wink

    We probably misunderstood each other. smile What I meant in the topic with the above-posted link is that "the second article" is always the same and is always irrelevant to the main (first) article.

    Saskatchewan Friday, May 4, 2012 12:29:49 PM

    In the colour picker, if I input the colour code manually and incorrectly, colour may be recognized, but it doesn't change when input field loses focus, nor it is remembered. For example: input "ff0000" without # or "#fffffff" (with too many f's, like when you want to choose white and you press and hold "F" wink)

    QuHno Friday, May 4, 2012 1:21:33 PM

    Originally posted by TiRaNiD:

    The link is just the hint that "the second article"


    Oh, now I have got it, you didn't mean "article" but "paragraph", right?

    OK, I'll look into it.

    Originally posted by Saskatchewan:

    if I input the colour code manually and incorrectly,

    That's a funny one, never tested that before. I think I should add a sanity check to the input bigsmile

    TiRANiDTiRaNiD Friday, May 4, 2012 1:59:47 PM

    Originally posted by QuHno:

    Oh, now I have got it, you didn't mean "article" but "paragraph", right?


    Nope. I meant "article". Try it on this one - http://www.sciencesetavenir.fr/fondamental/20120504.OBS4671/h5n1-quatre-mutations-qui-rendent-un-virus-aviaire-contagieux-entre-mammiferes.html

    The main article is loaded all right. Then, one more article is loaded and added. But (!) without the headline (number '2' is placed there in place of the headline). What comes after the number '2' is another article (and I mean it smile) (btw, totally irrelevant to the previous one - there are no connection between them).

    This happens on this site only. No matter what article is chosen, there is always another article which is added and has number '2' in place of the headline. no

    QuHno Friday, May 4, 2012 4:07:57 PM

    OK - the input thingy should be solved - it was a race condition and took some time to find.

    So here it is: Version 1.5.39 1.5.40

    Still no solution for the French science site but one bug squashed per day is better than none bigsmile


    edit: ... but I looked into the source and found an automatic generated "next page" link which gets inserted into the page by JS. Nothing I can really do against apart from blocking page merging for that page, at least nothing that comes to my mind now. I'll have to meditate on that, that seems to be tricky too ...

    Is there article pagination on that site at all? If not, I can just block it ...

    QuHno Tuesday, May 8, 2012 3:51:58 PM

    An new experimental build

    - trying to set some presets for colors

    The UI is not finished and I still don't know what is the best way to present the presets.

    Wishes for color combinations are welcome, my taste for colors might not be the best, so GIVE ME ALL THE #COLOR CODES! wink

    Download from my private server: cleanPagesX.oex

    It should happily install beside to the normal test version without affecting the settings made there. Other presets will follow but at the moment the sun is shining and I can't see any code any more ...

    TiRANiDTiRaNiD Tuesday, May 8, 2012 4:38:41 PM

    Originally posted by QuHno:

    Is there article pagination on that site at all? If not, I can just block it ...


    No, there's no pagination on that site. You can block it with confidence. smile

    New icon doesn't look good, imo. Previous looked better. sherlock

    We have presets! Thanks! up

    Could you include the preset with these colours - http://files.myopera.com/TiRaNiD/files/preset_yellow.png or replace one of the presets with this one (I'd offer to replace light green)?
    The colours: background: #FFFACD; font: #0D0C0C; link: #45509E.

    The way you presented the presets is good, they fit in very well.

    Is the option of saving user-defined presets planned? wait

    Chocimierchocimir Tuesday, May 8, 2012 4:54:48 PM

    When you working on color settings, I think you should change two things:
    - add description what color of it is (text, link, background, title).
    - add option to keep color text for links and titles (I imagine it as checkboxes), because links are underlined, titles are bigger. For me it suffice, I don't need also other colors of this. Then changing text color will be faster. Now we need to change color 3 times (oh, long sentence bigsmile ).

    There is also other thing to fix — in help page, clicking on icon on "reload from cache" doesn't take effect.

    QuHno Tuesday, May 8, 2012 6:32:27 PM

    This version was just a POC (Proof of Concept) that presets can be integrated, it is far from finished and I need something new for v1.6 bigsmile

    I think these changes will not make it into the submission for the addons catalog, but an update from time to time should not be the worst smile

    @TiRANiD: I'll build in the colors


    Originally posted by chocimir:

    add description what color of it is (text, link, background, title).

    You mean for the color boxes? yes, planned for the version with presets.

    Originally posted by chocimir:

    add option to keep color text for links and titles (I imagine it as checkboxes)

    I hate checkboxed - err - no, not checkboxed but the program logic that goes with them. The idea is good but I'll need some time to do that.

    I thought about hiding the "advanced" settings and primarily just offer the presets (for fonts and widths too) with the option to hide the presets and to show the "advanced" settings, someting like in this experiment ...

    Originally posted by chocimir:

    There is also other thing to fix — in help page, clicking on icon on "reload from cache" doesn't take effect.


    Hm, can't reproduce that. Here it offers to install a button.
    Afterwards you can drag and drop the button to the toolbar of your choice ... of course not on the help page, because it lacks most of the toolbars, but on a normal webpage or if you followed the instructions and show all toolbars when customizing...

    Chocimierchocimir Tuesday, May 8, 2012 7:16:41 PM

    Originally posted by QuHno:

    Hm, can't reproduce that. Here it offers to install a button.

    I write don't clearly enough, or you are magican… Clicking there really works? How? http://files.myopera.com/chocimir/zrzuty/zrzutekranu50.png -
    <div id="btn_icon" style='width: -o-skin; height: -o-skin; background-image: -o-skin("Restart Transfer")' title="refresh"></div><a href="opera:/button/Refresh%20Display,,,refresh,%22Restart%20Transfer%22" id="btn_anchor">refresh</a>

    QuHno Wednesday, May 9, 2012 5:02:54 AM

    Oh! OK, the icon itself can not be clicked! Confirmed and will be solved in the next version.

    Sorry that I missed that part of the original description, I will not skim when reading next time smile

    QuHno Wednesday, May 9, 2012 11:44:55 AM

    Version 1.5.41 (stable branch without presets)

    - Turkish translation for the config and preferences page added (not yet finished, the translator wanted to see the stings in place to check some problematic strings)
    - Refresh icon click bug squashed
    - Switched off pagination for sciencesetavenir.fr

    edit:
    Version 1.5.42 (stable branch without presets)

    - Czech translation added (help comes later)

    Mağruf ÇolakoğluZAHEK Thursday, May 10, 2012 10:37:04 AM

    Hi, new Turkish translation files is sent to you.

    QuHno Thursday, May 10, 2012 6:09:46 PM

    Thanks you, they are in the oex now smile

    Version 1.5.43

    - full Turkish translation added.

    Unrealmirakulix Thursday, May 10, 2012 6:50:39 PM

    loooong loading time when going to preferences ;( @ 1.5.43 + Opera 11.64

    QuHno Thursday, May 10, 2012 7:20:38 PM

    Blame Opera.

    That started with 11.64 and is even worse with 12. I didn't change any performance relevant things in the extension at least not in the preferences page.

    ... and there is still no JS profiler in DF, so I can't really see what could be sped up. May be I'll build a debug build ...

    Mağruf ÇolakoğluZAHEK Thursday, May 10, 2012 7:24:03 PM

    thanks.

    Unrealmirakulix Thursday, May 10, 2012 7:58:09 PM

    Originally posted by QuHno:

    Blame Opera.

    That started with 11.64 and is even worse with 12. I didn't change any performance relevant things in the extension at least not in the preferences page.

    ... and there is still no JS profiler in DF, so I can't really see what could be sped up. May be I'll build a debug build ...

    ... jep, i.e. youtube oex "ExtendTube" is going crazy (play, stop, play, stop ...; ...) scared

    QuHno Friday, May 11, 2012 4:58:37 AM

    In 12 repetitive clicks on the CP icon lead to not reacting at all after some time, or more correctly:
    You click on the button to clean the page, you click a 2nd time to view the normal page again, then you decide to click again etc. ...

    ... after some time, sometimes starting with click 3, sometimes starting later, Opera needs up to (Number of Iframes on the page) clicks to clean the page again.

    (reported as DSK-362960)

    If that behavior doesn't change, I will not submit the extension for review, because I don't have the nerve and the time to answer all the bug tickets I will get for that, especially when it is not my fault.

    edit:
    PS: Version 1.5.44
    - final Turkish translation
    - some other minor changes in the code, nothing that should be visible ...

    Mağruf ÇolakoğluZAHEK Friday, May 11, 2012 10:49:59 AM

    up

    TiRANiDTiRaNiD Friday, May 11, 2012 11:35:21 AM

    I'm waiting for another alpha with presets. coffee
    Especially with those two presets I asked you to include.

    BTW, cleanPagesX broke the mouse gesture settings (open cleanPages with mouse gesture) and the 'no-presets' version doesn't start with the mouse gesture anymore. Even if cleanPagesX is turned off.

    QuHno Friday, May 11, 2012 12:30:23 PM

    oh darn... awww

    I forgot completely that they both react to the same gesture and shortcut code, no wonder that it breaks, sorry. Does uninstalling them and installing just one version again fix it?

    The color preset will be easy (just exchanging some values), but user defined presets is a little bit tricky and might take some more time - despite being on my wishlist for a longer time too.

    BS-Harou gave me some hints how I could do that, but the main code became quite complex during the last year and I have to be carefully not to break too much when I implement new stuff. For every build you see here I have made about 10 or so test builds - and still you can find bugs, you see what I mean? wink

    I hope I can spare some hours in a row this weekend to fix and add some things in the cpX version ...

    TiRANiDTiRaNiD Friday, May 11, 2012 2:26:46 PM

    Originally posted by QuHno:

    Does uninstalling them and installing just one version again fix it?


    Yes, it does. The 'no-presets' version works good with the mouse gesture again.

    Originally posted by QuHno:

    and still you can find bugs, you see what I mean?


    This JS stuff is pretty tricky, I guess. smile

    QuHno Friday, May 11, 2012 6:35:22 PM

    It would be half as tricky if there were some mechanisms available that Chrome or Firefox have for manipulating the UI or accessing files from the background process and to pass them to the script that is injected into the webpages to analyze them - which makes it quite hard to exchange the settings on the fly.

    It would be even less tricky, if normal web pages would stick a little bit more to semantic meaningful code and especially be valid.

    e.g. the sciencesetavenir page from above shows 36 hard errors and 9 warnings and the poor injected script has to dig through that mess and make a meaning of it - and that is not even one of the really bad coded pages.

    In the end I am always astonished how robust the whole extension is, with all that errors it has to handle I wouldn't be astonished if it just exploded lol

    TiRANiDTiRaNiD Saturday, May 12, 2012 9:22:56 AM

    Originally posted by QuHno:

    the sciencesetavenir page from above shows 36 hard errors and 9 warnings


    Geez... If even a renowned science site has such a poor code I can imagine Internet is a real nightmare for developers these days. faint

    Originally posted by QuHno:

    Switched off pagination for sciencesetavenir.fr


    Still not switched off. Version 1.5.44.

    QuHno Saturday, May 12, 2012 1:08:41 PM

    ... one tiny "" too much doh

    1.5.45 standard.
    - now switched off. Really.

    1.5.45-x experimental.
    - switched off too
    - light yellow style added (imho a little bit too yellow?)
    - standard and advanced setting mode

    both:
    - small buglet in the preview killed (overflow and scrollbars to the right if the window is too narrow)
    - appearance of the footnotes changed so that they look the same in the preview as on the page.
    - a ton of new event listeners added.

    Saskatchewan Saturday, May 12, 2012 1:28:37 PM

    Last link to experimental build points to standard cleanPages instead of this one.

    QuHno Saturday, May 12, 2012 1:59:45 PM

    woops - corrected.
    Thanks for pointing at it smile

    Unrealmirakulix Sunday, May 13, 2012 10:35:21 AM

    Wäre es möglich die "Bearbeiten"-Links zu auszublenden?

    z.B. bei Wikis oder auch hier: http://flexikon.doccheck.com/Sehvorgang

    -> störend beim Lesen
    -> unschöne Optik
    -> bei aktivieren Refs endlos viele Quellen

    Unrealmirakulix Sunday, May 13, 2012 10:38:52 AM

    white border (left, right) after switching back from print preview wink


    edit: also after printing, sometimes only a white box around sidebar menu buttons (quadratic) wink

    no images on: http://www.augen-seiten.de/sehen.htm + http://www.sinnesphysiologie.de/hvsinne/auge/seh01.htm :-?

    QuHno Sunday, May 13, 2012 11:00:30 AM

    Originally posted by Unrealmirakulix:

    Wäre es möglich die "Bearbeiten"-Links zu auszublenden?


    Wäre es - aber was mache ich damit auf anderen Seiten kaputt?

    Originally posted by Unrealmirakulix:

    white border (left, right) after switching back from print preview


    You use Opera for printing? bigeyes

    I am afraid I can't do anything against that. It is a failure of Operas screen refresh after switching back to the normal view under some circumstances. If I search long enough in the list of all the bugs I submitted, I even can tell you the the number of this bug pirate

    Unrealmirakulix Sunday, May 13, 2012 11:06:39 AM

    Originally posted by QuHno:

    Originally posted by Unrealmirakulix:

    Wäre es möglich die "Bearbeiten"-Links zu auszublenden?

    Wäre es - aber was mache ich damit auf anderen Seiten kaputt?

    Originally posted by Unrealmirakulix:

    white border (left, right) after switching back from print preview

    You use Opera for printing? bigeyes I am afraid I can't do anything against that. It is a failure of Operas screen refresh after switching back to the normal view under some circumstances. If I search long enough in the list of all the bugs I submitted, I even can tell you the the number of this bug pirate



    Das bearbeiten steht doch immer in eckigen Klammern kann man dass nicht in Kombi mit einem "Wörterbuch inkl. bearbeiten, Bearebiten, edit, Edit, EDIT, ... prüfen lassen?

    -----------------------

    ^^ bin einfach grad zu faul den IE aufzumachen oder gar Lunascape zu starten... wink

    QuHno Sunday, May 13, 2012 11:16:16 AM

    Originally posted by Unrealmirakulix:

    Das bearbeiten steht doch immer in eckigen Klammern kann man dass nicht in Kombi mit einem "Wörterbuch inkl. bearbeiten, Bearebiten, edit, Edit, EDIT, ... prüfen lassen?

    Könnte man, sollte man aber nicht, da REGEX teuer sind was die Bearbeitung angeht.


    Unrealmirakulix asked, if I could remove the edit links in Wikipedia and similar Wikis and I wondered if that would break other things.

    In the meantime I took a look at several similar wiki pages and all seemed to have in common, that these links are encapsulated in an element with the class "editsection". I'll make a test build that removes those and ask you for some testing if it breaks other pages. If it doesn't break things, I'll merge it into the stable branch.

    QuHno Sunday, May 13, 2012 11:38:07 AM

    New experimental and stable version 1.5.47

    This build removes the "edit" links from standard wiki pages like e.g. wikipedia and flexicon.doccheck

    Please watch out if it breaks things on other pages too.

    Download:
    cleanPages.oex (stable)
    cleanPagesX.oex (experimental)

    Unrealmirakulix Monday, May 14, 2012 3:58:06 PM

    thanks. Much more elegant bigsmile

    TiRANiDTiRaNiD Monday, May 14, 2012 9:55:00 PM

    Three questions:

    1. Will you add those two styles I asked you to add to the presets?

    2. Will it be possible for the changes made by user to any of the presets to be saved automatically (including changes made to the font-size, background, etc., so switching between styles wouldn't break the changes)?

    3. Will it be possible to add an animation to the process of cleaning of the page (for example, 'tastefull words'-like animation)?

    All these three points are crucial.

    How to use Quote function:

    1. Select some text
    2. Click on the Quote link

    Write a comment

    Comment
    (BBcode and HTML is turned off for anonymous user comments.)

    If you can't read the words, press the small reload icon.


    Smilies