Skip to content

Commit c636617

Browse files
committed
Updated README and install/update pages
1 parent ebd85dc commit c636617

File tree

5 files changed

+20
-16
lines changed

5 files changed

+20
-16
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Regex Search
22
===============
33

4-
This is a chrome extension that allows you to search the text of any page using regular expressions.
4+
This is a chrome extension written in [TypeScript](http://www.typescriptlang.org/) that allows you to search the text of any page using regular expressions.
55

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

@@ -19,3 +19,8 @@ Build guide
1919
============
2020
1. Clone this repo and execute ```npm install``` inside the created directory,
2121
2. Run ```grunt``` in order to build the extension (```build/``` is the output directory).
22+
23+
Contributers
24+
============
25+
26+
Thanks to [ComFreek](https://github.com/ComFreek) for converting a large portion of the code base to TypeScript.

src/background/KeyboardHandler.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ module KeyboardHandler {
77
var lastCalled: number = 0;
88

99
export function init(tabStates: TabStateManager) {
10-
chrome.commands.onCommand.addListener(function (command: string) {
10+
chrome.commands.onCommand.addListener(function(command: string) {
1111
Log.info("Received command " + command);
1212
Utils.withActiveTab(function(tab: chrome.tabs.Tab) {
1313
var id = tab.id;
1414

15-
// The time hack is to get around this function being called twice when
16-
// the popup is open
15+
// The time hack is due to a bug in Chrome:
16+
// https://code.google.com/p/chromium/issues/detail?id=355559
1717
var d = new Date();
1818
if (tabStates.exists(id) && tabStates.get(id, "searching")
1919
&& d.getTime() - lastCalled > 50) {

src/content/content.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ function elementInViewport(el) {
240240
left += el.offsetLeft;
241241
}
242242

243-
return top >= window.pageYOffset && left >= window.pageXOffset
244-
&& (top + height) <= (window.pageYOffset + window.innerHeight)
245-
&& (left + width) <= (window.pageXOffset + window.innerWidth);
243+
return top >= window.pageYOffset && left >= window.pageXOffset &&
244+
(top + height) <= (window.pageYOffset + window.innerHeight) &&
245+
(left + width) <= (window.pageXOffset + window.innerWidth);
246246
}

src/pages/install.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<title>Regex Search Updated</title>
55
</head>
66
<body>
7-
<h1>Regex Search 1.6</h1>
7+
<h1>Regex Search 1.7</h1>
88
<b>How to use:</b>
99
<ul>
1010
<li>Type in a regex query and click Next to search. Clicking Next again will go to the next match. Modifying the search query will clear the current search. Note that this extension will not work on the Chrome store, so do not test it on any Chrome store pages.</li>
@@ -14,7 +14,7 @@ <h1>Regex Search 1.6</h1>
1414
<li>You can open the extension by typing Alt+Shift+F. You can go to the next and previous search results by typing Alt+Shift+N and Alt+Shift+P, respectively. These shortcuts can be configured by going to the bottom of the extensions page and clicking "Keyboard Shortcuts"</li>
1515
<li>This extension uses the JavaScript regex engine. I create a regular expression using 'new RegExp(regexp, flags)', where flags are currently either 'g' or 'gi'.</li>
1616
<li>This extension is open source and the code can be found <a href="https://github.com/gsingh93/regex-search">here</a>. I'd appreciate any help, whether it's adding new features, fixing bugs, or making the extension look better (including this page).</li>
17-
<li>If you find any bugs, let me know <a href="https://github.com/gsingh93/regex-search/issues">here</a>.
17+
<li>If you find any bugs, let me know <a href="https://github.com/gsingh93/regex-search/issues">here</a>.</li>
1818
<li>If you like this extension, please review it in the <a href="https://chrome.google.com/webstore/detail/regex-search/bcdabfmndggphffkchfdcekcokmbnkjl/reviews">Chrome store</a></li>
1919
</ul>
2020
<b>Upcoming Features:</b>

src/pages/update.html

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,19 @@
44
<title>Regex Search Updated</title>
55
</head>
66
<body>
7-
<h1>Regex Search 1.6</h1>
7+
<h1>Regex Search 1.7</h1>
88
<b>Updates:</b>
99
<ul>
10-
<li>Search and Clear buttons have been removed. Search with the Next button, and clear by modifying the regex.</li>
11-
<li>Next button is greyed out when not applicable, just as requested.</li>
12-
<li>Next and Prev buttons now wrap around.</li>
13-
<li>You can open the extension by typing Alt+Shift+F. You can go to the next and previous search results by typing Alt+Shift+N and Alt+Shift+P, respectively. These shortcuts can be configured by going to the bottom of the extensions page and clicking "Keyboard Shortcuts"</li>
14-
<li>You will now see "Searching..." in the upper right corner while a search is running so you know that the extension is working</li>
10+
<li>Most of the code base has been converted to TypeScript with the help of <a href="https://github.com/ComFreek">ComFreek</a></li>
11+
<li>Fixed a bug where search doesn't work when changing to a different page.</li>
12+
<li>Added an options page where you can set whether you want case insensitive to be on or off by default.</li>
1513
</ul>
1614
<b>Notes:</b>
1715
<ul>
16+
<li>You can open the extension by typing Alt+Shift+F. You can go to the next and previous search results by typing Alt+Shift+N and Alt+Shift+P, respectively. These shortcuts can be configured by going to the bottom of the extensions page and clicking "Keyboard Shortcuts"</li>
1817
<li>This extension uses the JavaScript regex engine. I create a regular expression using 'new RegExp(regexp, flags)', where flags are currently either 'g' or 'gi'.</li>
1918
<li>This extension is open source and the code can be found <a href="https://github.com/gsingh93/regex-search">here</a>. I'd appreciate any help, whether it's adding new features, fixing bugs, or making the extension look better (including this update page).</li>
20-
<li>This update probably introduced a couple of bugs. If you find any, let me know <a href="https://github.com/gsingh93/regex-search/issues">here</a>.
19+
<li>This update probably introduced a couple of bugs. If you find any, let me know <a href="https://github.com/gsingh93/regex-search/issues">here</a>.</li>
2120
<li>If you like this extension, please review it in the <a href="https://chrome.google.com/webstore/detail/regex-search/bcdabfmndggphffkchfdcekcokmbnkjl/reviews">Chrome store</a></li>
2221
</ul>
2322
<b>Upcoming Features:</b>

0 commit comments

Comments
 (0)