aboutsummaryrefslogtreecommitdiffstats
path: root/google-plus-commando.js
diff options
context:
space:
mode:
authoranekos2011-08-19 16:31:20 +0900
committeranekos2011-08-19 16:31:20 +0900
commit7927b916fa6f9055771f678e751657b841f23e1d (patch)
treed9224e71c289f91f4c84fddfb5c12ed559612313 /google-plus-commando.js
parent45f78d5e27aebb07dd3494b6af452c850e4ed7b7 (diff)
downloadvimperator-plugins-7927b916fa6f9055771f678e751657b841f23e1d.tar.bz2
忘れ物
Diffstat (limited to 'google-plus-commando.js')
-rw-r--r--google-plus-commando.js20
1 files changed, 7 insertions, 13 deletions
diff --git a/google-plus-commando.js b/google-plus-commando.js
index 1851032..ba938b5 100644
--- a/google-plus-commando.js
+++ b/google-plus-commando.js
@@ -36,7 +36,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
// INFO {{{
let INFO =
<>
- <plugin name="GooglePlusCommando" version="2.2.0"
+ <plugin name="GooglePlusCommando" version="2.2.1"
href="http://github.com/vimpr/vimperator-plugins/blob/master/google-plus-commando.js"
summary="The handy commands for Google+"
lang="en-US"
@@ -250,10 +250,12 @@ let g:gplus_commando_map_menu = "m"
return result;
},
- find: function (re) {
+ find: function (re, notre) {
let result = [];
for (let [, rule] in I(this.items)) {
if (re.test(rule.cssText)) {
+ if (notre && notre.test(rule.cssText))
+ continue;
result.push(rule);
}
}
@@ -271,9 +273,9 @@ let g:gplus_commando_map_menu = "m"
throw GPCError('Two and more rules are found');
},
- finder: function (re) {
+ finder: function (re, notre) {
let self = this;
- return function () self.find(re);
+ return function () self.find(re, notre);
}
};
@@ -285,15 +287,7 @@ let g:gplus_commando_map_menu = "m"
plusone: 'button[id^="po-"]',
currentEntry: {
- root: function () {
- let res, len = 0;
- for (let [, v] in IA(Elements.doc.querySelectorAll('div[id^="update-"][aria-live="polite"]'))) {
- let s = getSelector(v);
- if (s.length > len)
- [len, res] = [s.length, s];
- }
- return res;
- },
+ root: cssRules.finder(/border-left: 1px solid rgb\(77, 144, 240\);/, /border-top/),
unfold: cssRules.finder(/url\("\/\/ssl\.gstatic\.com\/s2\/oz\/images\/stream\/expand\.png"\)/),
menu: {
mute: '----'