Skip to content

Commit 203e0d3

Browse files
committed
Rest of files to unix newlines
1 parent 89cf6c1 commit 203e0d3

File tree

2 files changed

+46
-46
lines changed

2 files changed

+46
-46
lines changed

README.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# Showdown Helper
2-
3-
Showdown Helper is a Chrome extension that adds utilities to the Pokemon Showdown UI.
4-
5-
Feature List:
6-
* Clicking on a Pokemon in the team list will go directly to the Smogon page for it.
7-
* Show a notification on battle end
8-
* That's it for now :)
9-
10-
# Installation
11-
12-
Prod build:
13-
* Install from [Chrome Store](https://chrome.google.com/webstore/detail/showdown-helper/lgkjcofboheamlghbmmpegfdjifaaocl)
14-
15-
Trunk:
16-
* Clone this repo
17-
* Go to extensions -> developer mode -> add unpacked -> pick the repo folder
1+
# Showdown Helper
2+
3+
Showdown Helper is a Chrome extension that adds utilities to the Pokemon Showdown UI.
4+
5+
Feature List:
6+
* Clicking on a Pokemon in the team list will go directly to the Smogon page for it.
7+
* Show a notification on battle end
8+
* That's it for now :)
9+
10+
# Installation
11+
12+
Prod build:
13+
* Install from [Chrome Store](https://chrome.google.com/webstore/detail/showdown-helper/lgkjcofboheamlghbmmpegfdjifaaocl)
14+
15+
Trunk:
16+
* Clone this repo
17+
* Go to extensions -> developer mode -> add unpacked -> pick the repo folder

handle_message.js

+29-29
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
'use strict';
2-
3-
function handle_notification(request) {
4-
chrome.notifications.create({
5-
type: "basic",
6-
iconUrl: "icon.png",
7-
message: request.message,
8-
title: request.title
9-
});
10-
}
11-
12-
function is_pokemon_tooltip(tooltip_text) {
13-
return tooltip_text.match(/.*L[0-9]+(.|\n)*Abil.*/) !== null;
14-
}
15-
16-
function handle_tooltip(request) {
17-
console.log(is_pokemon_tooltip(request.contents), request.contents);
18-
}
19-
20-
chrome.runtime.onMessage.addListener((request) => {
21-
switch (request.type) {
22-
case 'notification':
23-
handle_notification(request);
24-
break;
25-
case 'tooltip':
26-
handle_tooltip(request);
27-
break;
28-
}
29-
});
1+
'use strict';
2+
3+
function handle_notification(request) {
4+
chrome.notifications.create({
5+
type: "basic",
6+
iconUrl: "icon.png",
7+
message: request.message,
8+
title: request.title
9+
});
10+
}
11+
12+
function is_pokemon_tooltip(tooltip_text) {
13+
return tooltip_text.match(/.*L[0-9]+(.|\n)*Abil.*/) !== null;
14+
}
15+
16+
function handle_tooltip(request) {
17+
console.log(is_pokemon_tooltip(request.contents), request.contents);
18+
}
19+
20+
chrome.runtime.onMessage.addListener((request) => {
21+
switch (request.type) {
22+
case 'notification':
23+
handle_notification(request);
24+
break;
25+
case 'tooltip':
26+
handle_tooltip(request);
27+
break;
28+
}
29+
});

0 commit comments

Comments
 (0)