Skip to content

Commit

Permalink
Temporarily disable weather
Browse files Browse the repository at this point in the history
  • Loading branch information
ibillingsley committed Feb 10, 2019
1 parent 426a557 commit a7523fd
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
@@ -1,7 +1,7 @@
Humble New Tab Page
===================

Redesigned new tab page featuring your bookmarks, apps, most visited, recently closed, and weather in a custom layout.
Redesigned new tab page featuring your bookmarks, apps, most visited, and recently closed in a custom layout.

![](media/shot.1.png)

Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Expand Up @@ -4,7 +4,7 @@
"version": "1.23.3",
"minimum_chrome_version": "37",
"manifest_version": 2,
"description": "Redesigned new tab page featuring your bookmarks, apps, most visited, recently closed, and weather in a custom layout.",
"description": "Redesigned new tab page featuring your bookmarks, apps, most visited, and recently closed in a custom layout.",
"icons": {
"128": "icon_128.png",
"48": "icon_48.png",
Expand Down
3 changes: 1 addition & 2 deletions newtab.css
Expand Up @@ -14,7 +14,7 @@ body {
position: relative;
max-width: 100%;
white-space: nowrap;
-webkit-user-select: none;
user-select: none;
}
#main ul, .menu {
margin: 0;
Expand Down Expand Up @@ -217,7 +217,6 @@ label {
label span {
float: left;
text-align: left;
max-width: 10.9em;
line-height: 1.9;
}
input, select, textarea, .revert {
Expand Down
6 changes: 3 additions & 3 deletions newtab.html
Expand Up @@ -42,16 +42,16 @@
<label><span>Recently closed</span><input id="options_show_closed" type="checkbox"/></label>
<label class="subopt"><span>Number of items</span><input id="options_number_closed" type="number" min="1" max="25"/></label>
<label><span>Other devices</span><input id="options_show_devices" type="checkbox"/></label>
<label><span>Weather</span><input id="options_show_weather" type="checkbox"/></label>
<!-- <label><span>Weather</span><input id="options_show_weather" type="checkbox"/></label> -->
</fieldset>
<fieldset>
<!-- <fieldset>
<legend>Weather</legend>
<label><span>Location</span><input id="options_weather_location" type="text"/></label>
<label><span>°C or °F</span><select id="options_weather_units">
<option value="c">Celsius</option>
<option value="f">Fahrenheit</option>
</select></label>
</fieldset>
</fieldset> -->
</div><div class="section">
<fieldset>
<legend>Font</legend>
Expand Down
34 changes: 17 additions & 17 deletions newtab.js
Expand Up @@ -752,17 +752,17 @@ function getChildrenFunction(node) {
callback(result);
});
};
case 'weather':
if (node.children)
return function(callback) {
callback(node.children);
};
else
return function(callback) {
getWeather(function(result) {
callback(result[0].children);
});
};
// case 'weather':
// if (node.children)
// return function(callback) {
// callback(node.children);
// };
// else
// return function(callback) {
// getWeather(function(result) {
// callback(result[0].children);
// });
// };
default:
if (node.children)
return function(callback) {
Expand Down Expand Up @@ -801,11 +801,11 @@ function getSubTree(id, callback) {
case 'devices':
callback([{ title: 'Other devices', id: 'devices', children: true }]);
break;
case 'weather':
getWeather(function(result) {
callback(result);
});
break;
// case 'weather':
// getWeather(function(result) {
// callback(result);
// });
// break;
default:
chrome.bookmarks.getSubTree(id, function(result) {
if (result)
Expand Down Expand Up @@ -982,7 +982,7 @@ function openLink(node, newtab) {
var columns; // columns[x][y] = id
var root; // root[] = id
var coords; // coords[id] = {x:x, y:y}
var special = ['top', 'apps', 'recent', 'weather', 'closed', 'devices'];
var special = ['top', 'apps', 'recent', /*'weather',*/ 'closed', 'devices'];

// ensure root folders are included
function verifyColumns() {
Expand Down

0 comments on commit a7523fd

Please sign in to comment.