X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=qml%2FQuickNewsReader%2Fcontent%2Fview%2FNewsComments.qml;h=ae825f869e6dffec84b1080cc4dd6e997346313d;hb=1e026a772f96cbe14ecd16fa27ab911877a59701;hp=8b136d688d59901996c60d7fead00e5b62e2694c;hpb=2263ab5869648d0eb7d82d8794aae03fd0ce954d;p=quicknewsreader diff --git a/qml/QuickNewsReader/content/view/NewsComments.qml b/qml/QuickNewsReader/content/view/NewsComments.qml index 8b136d6..ae825f8 100644 --- a/qml/QuickNewsReader/content/view/NewsComments.qml +++ b/qml/QuickNewsReader/content/view/NewsComments.qml @@ -1,3 +1,21 @@ +/*** +** Copyright (C) 2012 Christophe CHAPUIS +** +** This package is free software; you can redistribute it and/or modify +** it under the terms of the GNU General Public License as published by +** the Free Software Foundation; either version 2 of the License, or +** (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this package; if not, write to the Free Software +** Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +** +***/ import QtQuick 1.0 import QtWebKit 1.0 @@ -44,11 +62,18 @@ Item { } WebView { - id: newsCommentsWebView width: column.width + id: newsCommentsWebView url: commentURL preferredWidth: column.width -// preferredHeight: parent.height - titleRow.height + + // on the maemo platform, the background is dark gray by default, so change it to white + onLoadFinished: { + newsCommentsWebView.evaluateJavaScript("document.bgColor = '#FFFFFF';") + //newsCommentsWebView.evaluateJavaScript("readConvertLinksToFootnotes=false;readStyle='style-newspaper';readSize='size-medium';readMargin='margin-wide';_readability_script=document.createElement('script');_readability_script.type='text/javascript';_readability_script.src='file:///home/chris/dev/arc90labs-readability/js/readability.js?x='+(Math.random());document.documentElement.appendChild(_readability_script);_readability_css=document.createElement('link');_readability_css.rel='stylesheet';_readability_css.href='file:///home/chris/dev/arc90labs-readability/css/readability.css';_readability_css.type='text/css';_readability_css.media='all';document.documentElement.appendChild(_readability_css);_readability_print_css=document.createElement('link');_readability_print_css.rel='stylesheet';_readability_print_css.href='file:///home/chris/dev/arc90labs-readability/css/readability-print.css';_readability_print_css.media='print';_readability_print_css.type='text/css';document.getElementsByTagName('head')[0].appendChild(_readability_print_css);readability.init();") + } + + onAlert: console.log(message); } } }