feat: Add example weather extension (#26)
|
@ -0,0 +1,57 @@
|
|||
const API_KEY = "INSERT_API_KEY_HERE";
|
||||
const BASE_URL = `https://api.darksky.net/forecast`;
|
||||
|
||||
const icons = ["clear-day", "clear-night", "rain", "snow", "sleet", "wind",
|
||||
"fog", "partly-cloudy-day", "partly-cloudy-night", "hail", "thunderstorm"];
|
||||
|
||||
// An hour
|
||||
const UPDATE_INTERVAL = 60 * 60 * 1000;
|
||||
|
||||
const getCards = async () => {
|
||||
const {coords} = await new Promise(resolve =>
|
||||
navigator.geolocation.getCurrentPosition(pos => resolve(pos)));
|
||||
return new Promise(resolve => {
|
||||
const req = new XMLHttpRequest();
|
||||
req.addEventListener("load", () => {
|
||||
const data = JSON.parse(req.response);
|
||||
resolve(data.daily.data.map(({icon, summary, time, temperatureMax, temperatureMin}) => {
|
||||
const lang = browser.i18n.getUILanguage().replace("_", "-");
|
||||
const dateOptions = {weekday: "short"};
|
||||
const day = (new Date(time * 1000)).toLocaleDateString(lang, dateOptions);
|
||||
const iconPath = `icons/${icons.includes(icon) ? icon : "partly-cloudy-day"}.svg`;
|
||||
return {
|
||||
title: `${day} | high ${temperatureMax.toFixed(0)}° | low ${temperatureMin.toFixed(0)}°`,
|
||||
image: browser.extension.getURL(iconPath),
|
||||
description: summary
|
||||
};
|
||||
}));
|
||||
});
|
||||
req.open("GET", `${BASE_URL}/${API_KEY}/${coords.latitude},${coords.longitude}`);
|
||||
req.send();
|
||||
});
|
||||
};
|
||||
|
||||
let lastUpdated = 0;
|
||||
let cards;
|
||||
|
||||
const refresh = async (forceRefresh = false) => {
|
||||
if (!cards || forceRefresh || Date.now() - lastUpdated > UPDATE_INTERVAL) {
|
||||
cards = await getCards();
|
||||
browser.newTabSection.addCards(cards, true);
|
||||
lastUpdated = Date.now();
|
||||
}
|
||||
};
|
||||
|
||||
const init = async () => {
|
||||
await refresh(true);
|
||||
browser.newTabSection.onSystemTick.addListener(refresh);
|
||||
};
|
||||
|
||||
const uninit = () => {
|
||||
browser.newTabSection.onSystemTick.removeListener(refresh);
|
||||
};
|
||||
|
||||
browser.newTabSection.onInitialized.addListener(init);
|
||||
browser.newTabSection.onUninitialized.addListener(uninit);
|
||||
|
||||
browser.newTabSection.enable();
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="100px" height="100px" viewBox="-25 -25 150 150" enable-background="new 0 0 100 100" xml:space="preserve">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M71.997,51.999h-3.998c-1.105,0-2-0.895-2-1.999s0.895-2,2-2h3.998
|
||||
c1.105,0,2,0.896,2,2S73.103,51.999,71.997,51.999z M64.142,38.688c-0.781,0.781-2.049,0.781-2.828,0
|
||||
c-0.781-0.781-0.781-2.047,0-2.828l2.828-2.828c0.779-0.781,2.047-0.781,2.828,0c0.779,0.781,0.779,2.047,0,2.828L64.142,38.688z
|
||||
M50.001,61.998c-6.627,0-12-5.372-12-11.998c0-6.627,5.372-11.999,12-11.999c6.627,0,11.998,5.372,11.998,11.999
|
||||
C61.999,56.626,56.628,61.998,50.001,61.998z M50.001,42.001c-4.418,0-8,3.581-8,7.999c0,4.417,3.583,7.999,8,7.999
|
||||
s7.998-3.582,7.998-7.999C57.999,45.582,54.419,42.001,50.001,42.001z M50.001,34.002c-1.105,0-2-0.896-2-2v-3.999
|
||||
c0-1.104,0.895-2,2-2c1.104,0,2,0.896,2,2v3.999C52.001,33.106,51.104,34.002,50.001,34.002z M35.86,38.688l-2.828-2.828
|
||||
c-0.781-0.781-0.781-2.047,0-2.828s2.047-0.781,2.828,0l2.828,2.828c0.781,0.781,0.781,2.047,0,2.828S36.641,39.469,35.86,38.688z
|
||||
M34.002,50c0,1.104-0.896,1.999-2,1.999h-4c-1.104,0-1.999-0.895-1.999-1.999s0.896-2,1.999-2h4C33.107,48,34.002,48.896,34.002,50
|
||||
z M35.86,61.312c0.781-0.78,2.047-0.78,2.828,0c0.781,0.781,0.781,2.048,0,2.828l-2.828,2.828c-0.781,0.781-2.047,0.781-2.828,0
|
||||
c-0.781-0.78-0.781-2.047,0-2.828L35.86,61.312z M50.001,65.998c1.104,0,2,0.895,2,1.999v4c0,1.104-0.896,2-2,2
|
||||
c-1.105,0-2-0.896-2-2v-4C48.001,66.893,48.896,65.998,50.001,65.998z M64.142,61.312l2.828,2.828c0.779,0.781,0.779,2.048,0,2.828
|
||||
c-0.781,0.781-2.049,0.781-2.828,0l-2.828-2.828c-0.781-0.78-0.781-2.047,0-2.828C62.093,60.531,63.36,60.531,64.142,61.312z"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 2.0 KiB |
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="100px" height="100px" viewBox="-25 -25 150 150" enable-background="new 0 0 100 100" xml:space="preserve">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M50,61.998c-6.627,0-11.999-5.372-11.999-11.998
|
||||
c0-6.627,5.372-11.999,11.999-11.999c0.755,0,1.491,0.078,2.207,0.212c-0.132,0.576-0.208,1.173-0.208,1.788
|
||||
c0,4.418,3.582,7.999,8,7.999c0.615,0,1.212-0.076,1.788-0.208c0.133,0.717,0.211,1.452,0.211,2.208
|
||||
C61.998,56.626,56.626,61.998,50,61.998z M48.212,42.208c-3.556,0.813-6.211,3.989-6.211,7.792c0,4.417,3.581,7.999,7.999,7.999
|
||||
c3.802,0,6.978-2.655,7.791-6.211C52.937,50.884,49.115,47.062,48.212,42.208z"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 997 B |
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="100px" height="100px" viewBox="-25 -25 150 150" enable-background="new 0 0 100 100" xml:space="preserve">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M69.998,65.641H30.003c-1.104,0-2-0.896-2-2c0-1.105,0.896-2,2-2h39.995
|
||||
c1.104,0,2,0.895,2,2C71.998,64.744,71.103,65.641,69.998,65.641z M69.998,57.641H30.003c-1.104,0-2-0.895-2-2c0-1.104,0.896-2,2-2
|
||||
h39.995c1.104,0,2,0.896,2,2C71.998,56.746,71.103,57.641,69.998,57.641z M59.999,45.643c-1.601,0-3.083,0.48-4.333,1.291
|
||||
c-1.232-5.317-5.974-9.291-11.665-9.291c-6.626,0-11.998,5.373-11.998,12h-4c0-8.835,7.163-15.999,15.998-15.999
|
||||
c6.004,0,11.229,3.312,13.965,8.204c0.664-0.113,1.337-0.205,2.033-0.205c5.222,0,9.652,3.342,11.301,8h-4.381
|
||||
C65.535,47.253,62.958,45.643,59.999,45.643z M30.003,69.639h39.995c1.104,0,2,0.896,2,2c0,1.105-0.896,2-2,2H30.003
|
||||
c-1.104,0-2-0.895-2-2C28.003,70.535,28.898,69.639,30.003,69.639z"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 1.2 KiB |
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="100px" height="100px" viewBox="-25 -25 150 150" enable-background="new 0 0 100 100" xml:space="preserve">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M72.997,71.639c-1.104,0-1.999-0.895-1.999-2c0-1.104,0.895-2,1.999-2s2,0.896,2,2
|
||||
C74.997,70.744,74.102,71.639,72.997,71.639z M63.998,64.941v-4.381c2.389-1.383,4-3.961,4-6.92c0-4.417-3.581-7.999-7.999-7.999
|
||||
c-1.601,0-3.083,0.48-4.334,1.291c-1.231-5.317-5.973-9.29-11.664-9.29c-6.627,0-11.999,5.372-11.999,11.998
|
||||
c0,3.55,1.551,6.728,4,8.925v4.916c-4.777-2.768-7.999-7.922-7.999-13.841c0-8.835,7.162-15.997,15.998-15.997
|
||||
c6.004,0,11.229,3.311,13.965,8.203c0.664-0.113,1.337-0.205,2.033-0.205c6.626,0,11.998,5.372,11.998,11.999
|
||||
C71.997,58.863,68.655,63.293,63.998,64.941z M31.003,72.639c1.104,0,1.999,0.895,1.999,2c0,1.104-0.895,2-1.999,2s-2-0.896-2-2
|
||||
C29.003,73.533,29.898,72.639,31.003,72.639z M41.001,55.641c0-1.104-0.104-2,1-2s1,0.896,1,2v23.998h-2l0,0l0,0
|
||||
c0-2.209-1.79-4-3.999-4v-2c1.543,0,2.937,0.6,3.999,1.557V55.641z M50,69.639c-1.104,0-1-0.895-1-2v-7.998c0-1.105-0.104-2,1-2
|
||||
s1,0.895,1,2v7.998C51,68.744,51.104,69.639,50,69.639z M50,73.639c1.104,0,2,0.895,2,2c0,1.104-0.896,2-2,2s-2-0.896-2-2
|
||||
C48,74.533,48.896,73.639,50,73.639z M57.999,53.641c1.104,0,1,0.896,1,2v18.016c1.823-2.434,4.723-4.018,7.999-4.018v2
|
||||
c-4.418,0-7.999,3.582-7.999,8h-2c0-0.273,0.02-0.541,0.041-0.807c-0.054-0.334-0.041-0.744-0.041-1.193V55.641
|
||||
C56.999,54.537,56.895,53.641,57.999,53.641z"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 1.8 KiB |
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="100px" height="100px" viewBox="-25 -25 150 150" enable-background="new 0 0 100 100" xml:space="preserve">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M79.941,43.641h-4c-1.104,0-2-0.895-2-2c0-1.104,0.896-1.998,2-1.998h4
|
||||
c1.104,0,2,0.895,2,1.998C81.941,42.746,81.045,43.641,79.941,43.641z M72.084,30.329c-0.781,0.781-2.047,0.781-2.828,0
|
||||
c-0.781-0.78-0.781-2.047,0-2.827l2.828-2.828c0.781-0.781,2.047-0.781,2.828,0c0.781,0.78,0.781,2.047,0,2.828L72.084,30.329z
|
||||
M69.137,45.936L69.137,45.936c1.749,2.086,2.806,4.77,2.806,7.705c0,6.625-5.372,11.998-11.999,11.998c-2.775,0-12.801,0-15.998,0
|
||||
c-8.835,0-15.998-7.162-15.998-15.998s7.163-15.998,15.998-15.998c1.572,0,3.09,0.232,4.523,0.654
|
||||
c2.195-2.827,5.618-4.654,9.475-4.654c6.627,0,11.999,5.373,11.999,11.998C69.942,43.156,69.649,44.602,69.137,45.936z
|
||||
M31.947,49.641c0,6.627,5.371,11.998,11.998,11.998c3.616,0,12.979,0,15.998,0c4.418,0,7.999-3.582,7.999-7.998
|
||||
c0-4.418-3.581-8-7.999-8c-1.6,0-3.083,0.482-4.333,1.291c-1.231-5.316-5.974-9.289-11.665-9.289
|
||||
C37.318,37.643,31.947,43.014,31.947,49.641z M57.943,33.643c-2.212,0-4.215,0.898-5.662,2.349c2.34,1.436,4.285,3.453,5.629,5.854
|
||||
c0.664-0.113,1.337-0.205,2.033-0.205c2.125,0,4.119,0.559,5.85,1.527l0,0c0.096-0.494,0.15-1.004,0.15-1.527
|
||||
C65.943,37.225,62.361,33.643,57.943,33.643z M57.943,25.643c-1.104,0-1.999-0.895-1.999-1.999v-3.999c0-1.105,0.896-2,1.999-2
|
||||
c1.105,0,2,0.895,2,2v3.999C59.943,24.749,59.049,25.643,57.943,25.643z M43.803,30.329l-2.827-2.827
|
||||
c-0.781-0.781-0.781-2.048,0-2.828c0.78-0.781,2.047-0.781,2.827,0l2.828,2.828c0.781,0.78,0.781,2.047,0,2.827
|
||||
C45.851,31.11,44.584,31.11,43.803,30.329z"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 2.0 KiB |
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="100px" height="100px" viewBox="-25 -25 150 150" enable-background="new 0 0 100 100" xml:space="preserve">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M69.763,46.758L69.763,46.758c1.368,1.949,2.179,4.318,2.179,6.883
|
||||
c0,6.625-5.371,11.998-11.998,11.998c-2.775,0-12.801,0-15.998,0c-8.836,0-15.998-7.162-15.998-15.998s7.162-15.998,15.998-15.998
|
||||
c2.002,0,3.914,0.375,5.68,1.047l0,0c1.635-4.682,6.078-8.047,11.318-8.047c0.755,0,1.491,0.078,2.207,0.212
|
||||
c-0.131,0.575-0.207,1.173-0.207,1.788c0,4.418,3.581,7.999,7.998,7.999c0.616,0,1.213-0.076,1.789-0.208
|
||||
c0.133,0.717,0.211,1.453,0.211,2.208C72.941,41.775,71.73,44.621,69.763,46.758z M31.947,49.641
|
||||
c0,6.627,5.371,11.998,11.998,11.998c3.616,0,12.979,0,15.998,0c4.418,0,7.999-3.582,7.999-7.998c0-4.418-3.581-8-7.999-8
|
||||
c-1.6,0-3.083,0.482-4.334,1.291c-1.231-5.316-5.973-9.29-11.664-9.29C37.318,37.642,31.947,43.014,31.947,49.641z M51.496,35.545
|
||||
c0.001,0,0.002,0,0.002,0S51.497,35.545,51.496,35.545z M59.155,30.85c-2.9,0.664-5.175,2.91-5.925,5.775l0,0
|
||||
c1.918,1.372,3.523,3.152,4.68,5.22c0.664-0.113,1.337-0.205,2.033-0.205c2.618,0,5.033,0.85,7.005,2.271l0,0
|
||||
c0.858-0.979,1.485-2.168,1.786-3.482C63.881,39.525,60.059,35.706,59.155,30.85z"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 1.5 KiB |
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="100px" height="100px" viewBox="-25 -25 150 150" enable-background="new 0 0 100 100" xml:space="preserve">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M63.943,64.941v-4.381c2.387-1.385,3.998-3.961,3.998-6.92c0-4.418-3.58-8-7.998-8
|
||||
c-1.602,0-3.084,0.481-4.334,1.291c-1.232-5.316-5.973-9.29-11.664-9.29c-6.627,0-11.998,5.372-11.998,11.999
|
||||
c0,3.549,1.549,6.729,3.998,8.926v4.914c-4.777-2.768-7.998-7.922-7.998-13.84c0-8.836,7.162-15.998,15.998-15.998
|
||||
c6.004,0,11.229,3.312,13.965,8.203c0.664-0.113,1.336-0.205,2.033-0.205c6.627,0,11.998,5.373,11.998,12
|
||||
C71.941,58.861,68.6,63.293,63.943,64.941z M41.945,53.641c1.104,0,2,0.895,2,2v3.998c0,1.105-0.896,2-2,2c-1.105,0-2-0.895-2-2
|
||||
v-3.998C39.945,54.535,40.84,53.641,41.945,53.641z M41.945,65.639c1.104,0,2,0.895,2,2v3.998c0,1.105-0.896,2-2,2
|
||||
c-1.105,0-2-0.895-2-2v-3.998C39.945,66.533,40.84,65.639,41.945,65.639z M49.943,57.639c1.105,0,2,0.896,2,2v4c0,1.104-0.895,2-2,2
|
||||
c-1.104,0-1.998-0.896-1.998-2v-4C47.945,58.535,48.84,57.639,49.943,57.639z M49.943,69.639c1.105,0,2,0.895,2,1.998v4
|
||||
c0,1.105-0.895,2-2,2c-1.104,0-1.998-0.895-1.998-2v-4C47.945,70.533,48.84,69.639,49.943,69.639z M57.943,53.641
|
||||
c1.104,0,2,0.895,2,2v3.998c0,1.105-0.896,2-2,2c-1.105,0-2-0.895-2-2v-3.998C55.943,54.535,56.838,53.641,57.943,53.641z
|
||||
M57.943,65.639c1.104,0,2,0.895,2,2v3.998c0,1.105-0.896,2-2,2c-1.105,0-2-0.895-2-2v-3.998
|
||||
C55.943,66.533,56.838,65.639,57.943,65.639z"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 1.8 KiB |
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="100px" height="100px" viewBox="-25 -25 150 150" enable-background="new 0 0 100 100" xml:space="preserve">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M63.999,64.943v-4.381c2.389-1.385,3.999-3.963,3.999-6.922
|
||||
c0-4.416-3.581-7.998-7.999-7.998c-1.6,0-3.083,0.48-4.333,1.291c-1.231-5.317-5.974-9.291-11.665-9.291
|
||||
c-6.627,0-11.998,5.373-11.998,12c0,3.549,1.55,6.729,4,8.924v4.916c-4.777-2.768-8-7.922-8-13.84
|
||||
c0-8.836,7.163-15.999,15.998-15.999c6.004,0,11.229,3.312,13.965,8.204c0.664-0.113,1.337-0.205,2.033-0.205
|
||||
c6.627,0,11.999,5.373,11.999,11.998C71.998,58.863,68.655,63.293,63.999,64.943z M42.001,57.641c1.105,0,2,0.896,2,2
|
||||
c0,1.105-0.895,2-2,2c-1.104,0-1.999-0.895-1.999-2C40.002,58.537,40.897,57.641,42.001,57.641z M42.001,65.641c1.105,0,2,0.895,2,2
|
||||
c0,1.104-0.895,1.998-2,1.998c-1.104,0-1.999-0.895-1.999-1.998C40.002,66.535,40.897,65.641,42.001,65.641z M50.001,61.641
|
||||
c1.104,0,2,0.895,2,2c0,1.104-0.896,2-2,2c-1.105,0-2-0.896-2-2C48.001,62.535,48.896,61.641,50.001,61.641z M50.001,69.639
|
||||
c1.104,0,2,0.896,2,2c0,1.105-0.896,2-2,2c-1.105,0-2-0.895-2-2C48.001,70.535,48.896,69.639,50.001,69.639z M57.999,57.641
|
||||
c1.105,0,2,0.896,2,2c0,1.105-0.895,2-2,2c-1.104,0-1.999-0.895-1.999-2C56,58.537,56.896,57.641,57.999,57.641z M57.999,65.641
|
||||
c1.105,0,2,0.895,2,2c0,1.104-0.895,1.998-2,1.998c-1.104,0-1.999-0.895-1.999-1.998C56,66.535,56.896,65.641,57.999,65.641z"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 1.7 KiB |
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="100px" height="100px" viewBox="-25 -25 150 150" enable-background="new 0 0 100 100" xml:space="preserve">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M63.999,64.943v-4.381c2.389-1.385,3.999-3.963,3.999-6.922
|
||||
c0-4.416-3.581-7.998-7.999-7.998c-1.6,0-3.083,0.48-4.333,1.291c-1.231-5.317-5.974-9.291-11.665-9.291
|
||||
c-6.627,0-11.998,5.373-11.998,12c0,3.549,1.55,6.729,4,8.924v4.916c-4.777-2.768-8-7.922-8-13.84
|
||||
c0-8.836,7.163-15.999,15.998-15.999c6.004,0,11.229,3.312,13.965,8.204c0.664-0.113,1.337-0.205,2.033-0.205
|
||||
c6.627,0,11.999,5.373,11.999,11.998C71.998,58.863,68.655,63.293,63.999,64.943z M42.001,57.641c1.105,0,2,0.896,2,2
|
||||
c0,1.105-0.895,2-2,2c-1.104,0-1.999-0.895-1.999-2C40.002,58.537,40.897,57.641,42.001,57.641z M42.001,65.641c1.105,0,2,0.895,2,2
|
||||
c0,1.104-0.895,1.998-2,1.998c-1.104,0-1.999-0.895-1.999-1.998C40.002,66.535,40.897,65.641,42.001,65.641z M50.001,61.641
|
||||
c1.104,0,2,0.895,2,2c0,1.104-0.896,2-2,2c-1.105,0-2-0.896-2-2C48.001,62.535,48.896,61.641,50.001,61.641z M50.001,69.639
|
||||
c1.104,0,2,0.896,2,2c0,1.105-0.896,2-2,2c-1.105,0-2-0.895-2-2C48.001,70.535,48.896,69.639,50.001,69.639z M57.999,57.641
|
||||
c1.105,0,2,0.896,2,2c0,1.105-0.895,2-2,2c-1.104,0-1.999-0.895-1.999-2C56,58.537,56.896,57.641,57.999,57.641z M57.999,65.641
|
||||
c1.105,0,2,0.895,2,2c0,1.104-0.895,1.998-2,1.998c-1.104,0-1.999-0.895-1.999-1.998C56,66.535,56.896,65.641,57.999,65.641z"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 1.7 KiB |
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="100px" height="100px" viewBox="-25 -25 150 150" enable-background="new 0 0 100 100" xml:space="preserve">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M59.999,65.641c-0.28,0-0.649,0-1.062,0l3.585-4.412
|
||||
c3.181-1.057,5.477-4.053,5.477-7.588c0-4.418-3.581-7.998-7.999-7.998c-1.601,0-3.083,0.48-4.333,1.29
|
||||
c-1.232-5.316-5.974-9.29-11.665-9.29c-6.626,0-11.998,5.372-11.998,12c0,5.446,3.632,10.038,8.604,11.504l-1.349,3.777
|
||||
c-6.52-2.021-11.255-8.098-11.255-15.282c0-8.835,7.163-15.999,15.998-15.999c6.004,0,11.229,3.312,13.965,8.204
|
||||
c0.664-0.114,1.337-0.205,2.033-0.205c6.627,0,11.999,5.371,11.999,11.998S66.626,65.641,59.999,65.641z M48.001,51.641h9.998
|
||||
l-5.999,10h6.999L46.001,77.639l3.6-11.998h-6.6L48.001,51.641z"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 1.1 KiB |
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="100px" height="100px" viewBox="25 14 60 55" enable-background="new 0 0 100 100" xml:space="preserve">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" stroke="black" stroke-width="2" d="M79.941,43.641h-4c-1.104,0-2-0.895-2-2c0-1.104,0.896-1.998,2-1.998h4
|
||||
c1.104,0,2,0.895,2,1.998C81.941,42.746,81.045,43.641,79.941,43.641z M72.084,30.329c-0.781,0.781-2.047,0.781-2.828,0
|
||||
c-0.781-0.78-0.781-2.047,0-2.827l2.828-2.828c0.781-0.781,2.047-0.781,2.828,0c0.781,0.78,0.781,2.047,0,2.828L72.084,30.329z
|
||||
M69.137,45.936L69.137,45.936c1.749,2.086,2.806,4.77,2.806,7.705c0,6.625-5.372,11.998-11.999,11.998c-2.775,0-12.801,0-15.998,0
|
||||
c-8.835,0-15.998-7.162-15.998-15.998s7.163-15.998,15.998-15.998c1.572,0,3.09,0.232,4.523,0.654
|
||||
c2.195-2.827,5.618-4.654,9.475-4.654c6.627,0,11.999,5.373,11.999,11.998C69.942,43.156,69.649,44.602,69.137,45.936z
|
||||
M31.947,49.641c0,6.627,5.371,11.998,11.998,11.998c3.616,0,12.979,0,15.998,0c4.418,0,7.999-3.582,7.999-7.998
|
||||
c0-4.418-3.581-8-7.999-8c-1.6,0-3.083,0.482-4.333,1.291c-1.231-5.316-5.974-9.289-11.665-9.289
|
||||
C37.318,37.643,31.947,43.014,31.947,49.641z M57.943,33.643c-2.212,0-4.215,0.898-5.662,2.349c2.34,1.436,4.285,3.453,5.629,5.854
|
||||
c0.664-0.113,1.337-0.205,2.033-0.205c2.125,0,4.119,0.559,5.85,1.527l0,0c0.096-0.494,0.15-1.004,0.15-1.527
|
||||
C65.943,37.225,62.361,33.643,57.943,33.643z M57.943,25.643c-1.104,0-1.999-0.895-1.999-1.999v-3.999c0-1.105,0.896-2,1.999-2
|
||||
c1.105,0,2,0.895,2,2v3.999C59.943,24.749,59.049,25.643,57.943,25.643z M43.803,30.329l-2.827-2.827
|
||||
c-0.781-0.781-0.781-2.048,0-2.828c0.78-0.781,2.047-0.781,2.827,0l2.828,2.828c0.781,0.78,0.781,2.047,0,2.827
|
||||
C45.851,31.11,44.584,31.11,43.803,30.329z"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 2.0 KiB |
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="100px" height="100px" viewBox="-25 -25 150 150" enable-background="new 0 0 100 100" xml:space="preserve">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M68.866,36.459H30.871c-1.104,0-2-0.896-2-1.999c0-1.104,0.896-2,2-2h37.995
|
||||
c1.104,0,2,0.896,2,2C70.866,35.563,69.971,36.459,68.866,36.459z M32.871,40.459h29.996c1.104,0,2,0.896,2,2
|
||||
c0,1.104-0.896,1.999-2,1.999H32.871c-1.104,0-2-0.896-2-1.999C30.871,41.354,31.767,40.459,32.871,40.459z M44.869,48.458h21.998
|
||||
c1.104,0,1.999,0.896,1.999,1.999c0,1.104-0.895,2-1.999,2H44.869c-1.104,0-1.999-0.896-1.999-2
|
||||
C42.87,49.354,43.765,48.458,44.869,48.458z M46.869,64.456h5.999c1.104,0,2,0.896,2,1.999c0,1.104-0.896,2-2,2h-5.999
|
||||
c-1.104,0-2-0.896-2-2C44.869,65.352,45.765,64.456,46.869,64.456z M47.869,58.456c0-1.104,0.896-1.999,2-1.999h13.998
|
||||
c1.104,0,2,0.896,2,1.999c0,1.104-0.896,2-2,2H49.869C48.765,60.456,47.869,59.561,47.869,58.456z"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 1.2 KiB |
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="100px" height="100px" viewBox="-25 -25 150 150" enable-background="new 0 0 100 100" xml:space="preserve">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M65.999,52L65.999,52h-3c-1.105,0-2-0.895-2-1.999s0.895-2,2-2h3
|
||||
c1.104,0,2-0.896,2-1.999c0-1.105-0.896-2-2-2c-1.105,0-2-0.896-2-2s0.895-2,2-2c0.137,0,0.271,0.014,0.402,0.041
|
||||
c3.121,0.211,5.596,2.783,5.596,5.959C71.997,49.314,69.312,52,65.999,52z M55.999,48.001h-2h-6.998H34.002
|
||||
c-1.104,0-1.999,0.896-1.999,2S32.898,52,34.002,52h2h3.999h3h4h3h3.998h2c3.314,0,6,2.687,6,6c0,3.176-2.475,5.748-5.596,5.959
|
||||
C56.272,63.986,56.138,64,55.999,64c-1.104,0-2-0.896-2-2c0-1.105,0.896-2,2-2c1.105,0,2-0.896,2-2s-0.895-2-2-2h-2h-3.998h-3h-4h-3
|
||||
h-3.999h-2c-3.313,0-5.999-2.686-5.999-5.999c0-3.175,2.475-5.747,5.596-5.959c0.131-0.026,0.266-0.04,0.403-0.04l0,0h12.999h6.998
|
||||
h2c1.105,0,2-0.896,2-2s-0.895-2-2-2c-1.104,0-2-0.895-2-2c0-1.104,0.896-2,2-2c0.139,0,0.273,0.015,0.404,0.041
|
||||
c3.121,0.211,5.596,2.783,5.596,5.959C61.999,45.314,59.313,48.001,55.999,48.001z"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 1.4 KiB |
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
"name": "NewTabSection Weather Section Extension",
|
||||
"version": "1.0",
|
||||
"description": "This is a description.",
|
||||
"permissions": [
|
||||
"experiments.newTabSection",
|
||||
"geolocation",
|
||||
"webRequest",
|
||||
"https://api.darksky.net/*"
|
||||
],
|
||||
"background": {
|
||||
"scripts": ["background.js"]
|
||||
},
|
||||
"web_accessible_resources": [
|
||||
"icons/*"
|
||||
],
|
||||
"new_tab_section_options": {
|
||||
"title": "Weather",
|
||||
"icon": "icons/title-icon.svg",
|
||||
"maxRows": 2,
|
||||
"emptyState": {
|
||||
"message": "Cupcake ipsum dolor sit amet caramels caramels. Powder jelly beans tart. Tootsie roll sesame snaps marzipan brownie jujubes. Lollipop jelly-o gingerbread.",
|
||||
"icon": "check"
|
||||
}
|
||||
}
|
||||
}
|