Skip to content

Commit ae15069

Browse files
committed
Initial Commit
First published beta
1 parent 29f07f6 commit ae15069

14 files changed

+331
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
WindowSizer -- Window Resizing WebExtension
2+
===========================================
3+
4+
A simple, customizeable window resizer
5+
6+
- Define multiple custom width & height presets in options
7+
- Easily switch between them via toolbar menu
8+
9+
Inspired by the old Firefox add-on [Browsizer]
10+
11+
After upgrading to Firefox 57, I could no longer user Browsizer, and no suitable repalcements were available. So I decided to learn how to write an add-on using the WebExtensions API, and here's what I made within a few hours.
12+
13+
[Browsizer]: https://addons.mozilla.org/en-US/firefox/addon/browsizer

icons/ws_icon_128.png

3.53 KB
Loading

icons/ws_icon_16.png

2.91 KB
Loading

icons/ws_icon_32.png

3.01 KB
Loading

icons/ws_icon_48.png

3.3 KB
Loading

icons/ws_icon_512.png

4.87 KB
Loading

icons/ws_icon_96.png

3.59 KB
Loading

manifest.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"manifest_version": 2,
3+
"name": "WindowSizer",
4+
"version": "0.3beta",
5+
"author": "Dr. Cheap",
6+
"description": "Quickly resize the window to one of your favorite sizes.",
7+
"homepage_url": "https://addons.mozilla.org/en-US/firefox/addon/WindowSizer",
8+
"permissions": ["storage"],
9+
10+
"applications": {
11+
"gecko": {
12+
"id": "windowsizer@drcheap.com",
13+
"strict_min_version": "57.0"
14+
}
15+
},
16+
17+
"icons": {
18+
"48": "icons/ws_icon_48.png",
19+
"96": "icons/ws_icon_96.png"
20+
},
21+
22+
"options_ui": {
23+
"page": "options.html",
24+
"browser_style": true
25+
},
26+
27+
"browser_action": {
28+
"browser_style": true,
29+
"default_title": "WindowSizer",
30+
"default_popup": "toolbar_menu.html",
31+
"default_icon": {
32+
"16": "icons/ws_icon_16.png",
33+
"32": "icons/ws_icon_32.png"
34+
}
35+
}
36+
37+
}

options.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
th {
2+
text-align: left;
3+
}
4+
5+
th, td {
6+
padding-left: 10px;
7+
padding-top: 2px;
8+
]

options.html

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!DOCTYPE html>
2+
3+
<html>
4+
<head>
5+
<meta charset="utf-8">
6+
<link rel="stylesheet" href="options.css"/>
7+
</head>
8+
9+
<body>
10+
<fieldset>
11+
<legend>Mange Presets</legend>
12+
<form>
13+
<table id="presets">
14+
<tr>
15+
<th>Width</th>
16+
<th>Height</th>
17+
<th>Name</th>
18+
<th>Aciton</th>
19+
</tr>
20+
<tr id="addPreset">
21+
<td><input type="text" id="newWidth" name="newWidth" size="4" maxlength="4"></td>
22+
<td><input type="text" id="newHeight" name="newHeight" size="4" maxlength="4"></td>
23+
<td><input type="text" id="newName" name="newName" size="15" maxlength="15"></td>
24+
<td><button type="button" id="addNew">Add New</button></td>
25+
</tr>
26+
</table>
27+
</form>
28+
</fieldset>
29+
<script src="options.js"></script>
30+
</body>
31+
</html>

0 commit comments

Comments
 (0)