|
#Add your own site in the scripts IntroductionYou can add your own site to the scripts. You need to have some knowledge on javascript programming and how the script work. DetailsA siteParser object is defined at the very beginning of the script. It's a map function. It looks like: var siteParser = {
"hk.rd.yahoo.com": function(syhidden, text){
return contentParse(syhidden, text, {search:"id=\"ynstory\"", stripTags:["table","script"]});
},
"mysinablog.com": function(syhidden, text){
return contentParse(syhidden, text, {search:"class=\"post_content\""});
}
}- the object key (e.g. hk.rd.yahoo.com) will be compared against each rss link. If it is matched, it will run the corresponding function when press 'g'.
- the function
- params:
- syhidden: an dom object of a hidden div for temp use.
- text: the full text returned by the cross-site request
- return:
- the content which will replace the current item display
- the helper function 'contentParse': as usually it's only a matter of detecting certain class or id, you can feed in the parameters to 'contentParse' and an additional map specifying target search string to search through the returned full html.
|