Opera のフィード配信に望まないコンテンツが表示されても、user.css や urlfilter.ini では非表示にできないので、/usr/share/opera/styles/webfeeds.html に分岐を追加する必要あり。
ビフォー
for( var i=0,feedEntry; feedEntry=feed.entries[i++]; ) { var itemLi = hItemsUl.lastChild.cloneNode( true ); // set the href itemLi.firstChild.firstChild.setAttribute( 'href', feedEntry.uri||'#' ); // set the title itemLi.firstChild.firstChild.firstChild.nodeValue = sanitize( feedEntry.title.data ).textContent.trim()||noTilteStr; // set the timestamp & author var txt = feedEntry.publicationDate.toLocaleString(); if( feedEntry.author ) { txt += '\n'+ feedEntry.author; } itemLi.firstChild.nextSibling.firstChild.nodeValue = txt; // sanitize content sanitize( (feedEntry.content.data.trim()||'\xa0'), itemLi.lastChild ); // append itemLi to hItemsUl hItemsUl.insertBefore( itemLi, hItemsUl.lastChild ); }
for( var i=0,feedEntry; feedEntry=feed.entries[i++]; ) { var itemLi = hItemsUl.lastChild.cloneNode( true ); // set the href itemLi.firstChild.firstChild.setAttribute( 'href', feedEntry.uri||'#' ); // set the title itemLi.firstChild.firstChild.firstChild.nodeValue = sanitize( feedEntry.title.data ).textContent.trim()||noTilteStr; // set the timestamp & author var txt = feedEntry.publicationDate.toLocaleString(); if( feedEntry.author ) { txt += '\n'+ feedEntry.author; } itemLi.firstChild.nextSibling.firstChild.nodeValue = txt; // sanitize content sanitize( (feedEntry.content.data.trim()||'\xa0'), itemLi.lastChild ); // append itemLi to hItemsUl hItemsUl.insertBefore( itemLi, hItemsUl.lastChild ); }
アフター
for( var i=0,feedEntry; feedEntry=feed.entries[i++]; ) { // added by HCQF if ( feedEntry.uri.indexOf('rssad') === -1 ) { var itemLi = hItemsUl.lastChild.cloneNode( true ); // set the href itemLi.firstChild.firstChild.setAttribute( 'href', feedEntry.uri||'#' ); // set the title itemLi.firstChild.firstChild.firstChild.nodeValue = sanitize( feedEntry.title.data ).textContent.trim()||noTilteStr; // set the timestamp & author var txt = feedEntry.publicationDate.toLocaleString(); if( feedEntry.author ) { txt += '\n'+ feedEntry.author; } itemLi.firstChild.nextSibling.firstChild.nodeValue = txt; // sanitize content sanitize( (feedEntry.content.data.trim()||'\xa0'), itemLi.lastChild ); // append itemLi to hItemsUl hItemsUl.insertBefore( itemLi, hItemsUl.lastChild ); } }
for( var i=0,feedEntry; feedEntry=feed.entries[i++]; ) { // added by HCQF if ( feedEntry.uri.indexOf('rssad') === -1 ) { var itemLi = hItemsUl.lastChild.cloneNode( true ); // set the href itemLi.firstChild.firstChild.setAttribute( 'href', feedEntry.uri||'#' ); // set the title itemLi.firstChild.firstChild.firstChild.nodeValue = sanitize( feedEntry.title.data ).textContent.trim()||noTilteStr; // set the timestamp & author var txt = feedEntry.publicationDate.toLocaleString(); if( feedEntry.author ) { txt += '\n'+ feedEntry.author; } itemLi.firstChild.nextSibling.firstChild.nodeValue = txt; // sanitize content sanitize( (feedEntry.content.data.trim()||'\xa0'), itemLi.lastChild ); // append itemLi to hItemsUl hItemsUl.insertBefore( itemLi, hItemsUl.lastChild ); } }