Media Literacy: Difference between revisions

Jump to navigation Jump to search
1,688 bytes removed ,  9 June 2018
m
Line 23: Line 23:




Bookmarklet
Bookmarklet: 把從「
* 目的: 將「據透露」、「據了解」、「據指出」、「消息來源指出」、「知情人士透露」、「有人說」、「公認」等陳述的內容用黃色標示起來
* 安裝方式: 新增一書籤,然後將以下語法複製到「網址」處
* 使用: 閱讀新聞時,點選這個書籤,即可標示「據透露」等文字


 
程式碼修改自 [http://dpatrickcaldwell.blogspot.com/2010/09/regular-expression-search-bookmarklet.html D. Patrick Caldwell on Software Engineering: Regular Expression Search Bookmarklet]
修改自 [http://dpatrickcaldwell.blogspot.com/2010/09/regular-expression-search-bookmarklet.html D. Patrick Caldwell on Software Engineering: Regular Expression Search Bookmarklet] 版本
<pre>
javascript: if(void 0===searches)var searches=0;!function(){var e,t,r=0;if(0!=(e="(據透露|據了解|據指出|消息來源指出|知情人士透露|消息人士指示|內情人士指出|內情人士表示|消息人士表示|消息人士指出|有人說|謠傳|疑似|好像|認為|公認)([^。]*?)(。)").length){try{t=new RegExp(e,"i")}catch(t){return void alert("Unable to create regular expression using text "+e+".\n\n"+t)}var a="#"+(searches+8).toString(2).substr(-3).replace(/0/g,"3").replace(/1/g,"6"),o=a.replace(/3/g,"c").replace(/6/g,"f");if(searches%16/8>=1){var s=a;a=o,o=s}!function e(t,s){var l,c,n,d,i;if(c=0,3==t.nodeType)(l=t.data.search(s))>=0&&((n=document.createElement("ACRONYM")).title="Search "+(searches+1)+": "+s.toString(),n.style.backgroundColor=o,n.style.borderTop="1px solid "+a,n.style.borderBottom="1px solid "+a,n.style.fontWeight="bold",n.style.color=a,(d=t.splitText(l)).splitText(RegExp.lastMatch.length),i=d.cloneNode(!0),n.appendChild(i),d.parentNode.replaceChild(n,d),r++,c=1);else if(1==t.nodeType&&t.childNodes&&"SCRIPT"!=t.tagName.toUpperCase()&&"STYLE"!=t.tagName.toUpperCase)for(var p=0;p<t.childNodes.length;++p)p+=e(t.childNodes[p],s);return c}(document.body,t),window.status="Found "+r+" match"+(1==r?"":"es")+" for "+t+".",r>0&&searches++}}();
</pre>
 
Kej 版本
<pre>
<pre>
javascript: (function(){var b=document.getElementsByTagName("body");var t=b[0].innerHTML;var pattern = /(據透露|據了解|據指出|消息來源指出|知情人士透露|消息人士指示|內情人士指出|內情人士表示|消息人士表示|消息人士指出|有人說|謠傳|疑似|好像|認為|公認)([^。]*?)(。)/img;b[0].innerHTML=t.replace (pattern,"<span style=\"border:1px dashed #F7D800;background:#FBF7AA\">$1$2$3</span>");})();
javascript: if(void 0===searches)var searches=0;!function(){var e,t,r=0;if(null!=(e=prompt("Search regexp:",")/img;b[0].innerHTML=t.replace (pattern,"<span style=\"border:1px dashed #F7D800;background:#FBF7AA\">$1$2$3</span>");})();
</pre>
</pre>


Line 42: Line 33:
* [https://www.squarefree.com/bookmarklets/pagedata.html Text and Data Bookmarklets]
* [https://www.squarefree.com/bookmarklets/pagedata.html Text and Data Bookmarklets]
* [[Conjunctions bookmarklet | 轉折連詞的瀏覽器按鈕(Bookmarklet)]] 將表示轉折關係的連詞,例如「但是」、「不過」、「雖然」、「然而」等連詞(Conjunction)文字,加上黃色標示
* [[Conjunctions bookmarklet | 轉折連詞的瀏覽器按鈕(Bookmarklet)]] 將表示轉折關係的連詞,例如「但是」、「不過」、「雖然」、「然而」等連詞(Conjunction)文字,加上黃色標示
* [https://chrome.google.com/webstore/detail/regex-highlighter/fflhnegnapfabeeoanbnmhkengiabffb/related RegEx Highlighter] for {{chrome}} + 搜尋條件 {{kbd | key=<nowiki>(]*?)(。)</nowiki>}}


資料來源:  
資料來源:  

Navigation menu