Skip to content

Commit 35b824f

Browse files
committed
Move InfoSpan css into content.css and use proper constructor syntax
1 parent 53cfe98 commit 35b824f

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ This is a chrome extension written in [TypeScript](http://www.typescriptlang.org
55

66
You can download the extension here: https://chrome.google.com/webstore/detail/bcdabfmndggphffkchfdcekcokmbnkjl
77

8+
Pull requests are welcome, just base your changes on the dev branch instead of master, as master is only updated on every release and is often behind the dev branch.
9+
810
Necessary build tools
911
======================
1012
- NodeJS: [http://nodejs.org/](http://nodejs.org/)

src/content/content.css

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
.__regexp_search_selected {
22
background-color: #ff9632;
3-
}
3+
}
4+
5+
.__regexp_search_count {
6+
position: fixed;
7+
top: 0;
8+
left: 0;
9+
padding: 8px;
10+
background: rgba(255, 255, 0, 0.5);
11+
}

src/content/content.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,8 @@ module Content {
1313
class InfoSpan {
1414
private span = document.createElement('span');
1515

16-
public InfoSpan() {
17-
this.span.id = "_regexp_search_count";
18-
this.span.style.position = 'fixed';
19-
this.span.style.top = '0';
20-
this.span.style.left = '0';
21-
this.span.style.padding = '8px';
22-
this.span.style.background = 'rgba(255, 255, 0, 0.5)';
16+
public constructor() {
17+
this.span.className = "__regexp_search_count";
2318

2419
this.span.addEventListener('mouseover', function(event) {
2520
this.span.style.opacity = "0";

0 commit comments

Comments
 (0)