Skip to content

Instantly share code, notes, and snippets.

@CrBoy
Created June 27, 2011 02:44
Show Gist options
  • Save CrBoy/1048232 to your computer and use it in GitHub Desktop.
Save CrBoy/1048232 to your computer and use it in GitHub Desktop.
Plurk Mobile Unread_* Auto Opener
Automated open all the plurks which are my/unread/private and unread in plurk mobile pages.
<html>
<head>
<script type="text/javascript">
function check_url(tabId, changeInfo, tab) {
if (tab.url.indexOf("http://www.plurk.com/m") > -1)
chrome.pageAction.show(tabId);
};
function open_all_plurks(tab) {
chrome.tabs.executeScript(tab.id, {file: "plurkm_opener.user.js"});
}
chrome.pageAction.onClicked.addListener(open_all_plurks);
chrome.tabs.onUpdated.addListener(check_url);
</script>
</head>
</html>
{
"name": "Plurk Mobile Opener",
"version": "0.1",
"description": "Automated open all the plurks which are my/unread/private and unread in plurk mobile pages.
==========WARNING==========: This is just a alpha release. All things are disordered. The icon is an arbitrary choice from freeiconsdownload.com. Also, this package is not stable. Use it carefully!",
"page_action": {
"default_icon": "pmo.png",
"default_title": "Open all plurks"
},
"permissions": [
"tabs",
"http://www.plurk.com/m*"
],
"background_page": "background.html"
}
// ==UserScript==
// @name Plurk Mobile Unread_* Auto Opener
// @description Automated open all the plurks which are my/responded/private and unread in plurk mobile pages.
// @author CrBoy
// @include http://www.plurk.com/m/?mode=unread_*
// @version 1.0
// ==/UserScript==
var anchors = document.getElementsByTagName('a');
for (var i = 0; i < anchors.length; i++) {
var a = anchors[i];
if(a.className == "r"){
window.open(a.href);
}
}
// ==UserScript==
// @name Plurk Mobile Unread_* Auto Opener
// @description Automated open all the plurks which are my/responded/private and unread in plurk mobile pages.
// @author CrBoy
// @include http://www.plurk.com/m/?mode=unread_*
// @version 1.0
// ==/UserScript==
var anchors = document.getElementsByTagName('a');
for (var i = 0; i < anchors.length; i++) {
var a = anchors[i];
if(a.className == "r"){
window.open(a.href);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment