-
Notifications
You must be signed in to change notification settings - Fork 0
/
popup.html
107 lines (82 loc) · 1.91 KB
/
popup.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<script src="commons.js"></script>
<script>
function openTab(tabUrl) {
var button = event.button;
if(button > 1)
return;
var selected = true;
if(button == 1 || event.ctrlKey) // Middle Button or Ctrl click
selected = false;
chrome.tabs.create({ url: tabUrl, selected: selected });
}
function goToEvents() {
chrome.tabs.getAllInWindow(undefined, function(tabs) {
for (var i = 0, tab; tab = tabs[i]; i++) {
if (tab.url && isEventsUrl(tab.url)) {
chrome.tabs.update(tab.id, {selected: true});
window.close();
return;
}
}
window.close();
chrome.tabs.create({url: getEventsUrl()});
});
}
</script>
<style>
li {}
body {
width:500px;
max-height:600px;
overflow-x:hidden;
color:#333;
margin:0;
padding:0;
}
h1 {
font-size:1em;
font-family:Verdana;
}
.menu {float:right;}
.menu a { text-decoration:none;color:#9FAF35;}
.row1 {background:#eee;}
.event { padding: 5px;
margin-top:5px;
font-size:0.8em;
font-family:Verdana;
-webkit-border-radius:5px; border:1px solid #ddd;}
.image { float:left;
margin-right:5px;
margin-top:-3px;
vertical-align:top;
-webkit-border-radius:5px;
background: #ddd;
padding:3px;}
.created_at { font-weight: bold;}
.source_badge {
display:inline-block;
background:silver;
padding:1px 3px;
}
.trabe_exceptions {
background:#990000 !important;
}
.trabe_work {
background:#EA9E28 !important;
}
.info {
font-size:1.1em;
}
.event_description {
font-family:monospaced;
}
</style>
<div class="menu">
<a href="#" onclick="javascript:goToEvents();">todos</a>
|
<a href="#" onclick="javascript:window.location.reload()">refrescar</a>
|
<a href="#" onclick="javascript:window.close()"> cerrar </a>
</div>
<!-- all the stuff happens on the server -->
<script src="http://events.trabesoluciones.net/new_events.js"></script>