and though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here

...
 
Commits (2)
.idea
\ No newline at end of file
This diff is collapsed.
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 6);
/******/ })
/************************************************************************/
/******/ ({
/***/ 6:
/***/ (function(module, exports, __webpack_require__) {
/* global externalAPI */
if (false) {
chrome = browser;
}
function injectCode(func, action) {
const script = document.createElement('script');
script.textContent = `'use strict';try{(${func})('${action}');}catch(e){console.log('Fisher injected error',e);};`;
document.head.appendChild(script);
script.parentNode.removeChild(script);
}
function dispatchCurrentTrackUrl(action) {
let link;
const track = externalAPI.getCurrentTrack();
if (track && 'link' in track) {
link = track.link;
}
document.dispatchEvent(new CustomEvent('fisher_injected_event', {
detail: {action, link}
}));
}
chrome.runtime.onMessage.addListener((action) => {
switch (action) {
case 'getCurrentTrackUrl':
injectCode(dispatchCurrentTrackUrl, action);
break;
}
});
document.addEventListener('fisher_injected_event', (e) => chrome.runtime.sendMessage(e.detail));
/***/ })
/******/ });
\ No newline at end of file
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 7);
/******/ })
/************************************************************************/
/******/ ({
/***/ 7:
/***/ (function(module, exports, __webpack_require__) {
if (false) {
chrome = browser;
}
const $ = document.getElementById.bind(document);
const checkboxes = [
'shouldDownloadCover',
'enumerateAlbums',
'enumeratePlaylists',
'singleClickDownload',
'shouldUseFolder'
];
const selects = [
'downloadThreadCount',
'albumCoverSize',
'albumCoverSizeId3'
];
const texts = [
'folder'
];
let background;
window.addEventListener('error', e => {
background.console.warn(e.error.stack);
e.returnValue = false;
});
window.addEventListener('unhandledrejection', e => {
background.console.warn(e.reason);
e.returnValue = false;
});
function afterCheckboxChanged(checkbox) { // изменение UI
const checked = $(checkbox).checked;
if (checkbox === 'shouldDownloadCover') {
if (checked) {
$('albumCoverSize').removeAttribute('disabled');
} else {
$('albumCoverSize').setAttribute('disabled', 'disabled');
}
} else if (checkbox === 'shouldUseFolder') {
if (checked) {
$('folder').removeAttribute('disabled');
} else {
$('folder').setAttribute('disabled', 'disabled');
}
}
}
checkboxes.forEach(checkbox => {
$(checkbox).addEventListener('click', () => {
const checked = $(checkbox).checked;
background.fisher.storage.setItem(checkbox, checked);
afterCheckboxChanged(checkbox);
});
});
selects.forEach(select => {
$(select).addEventListener('click', () => {
let value = $(select).value;
if (select === 'downloadThreadCount') {
value = parseInt(value, 10);
}
background.fisher.storage.setItem(select, value);
});
});
texts.forEach(text => {
$(text).addEventListener('input', () => {
let value = $(text).value;
if (text === 'folder') {
value = background.fisher.utils.clearPath(value, true);
if (value === '') {
return; // не сохраняем
}
}
background.fisher.storage.setItem(text, value);
});
});
$('btnReset').addEventListener('click', () => {
background.fisher.storage.reset();
loadOptions(background);
});
function loadOptions(backgroundPage) {
background = backgroundPage;
checkboxes.forEach(checkbox => {
$(checkbox).checked = background.fisher.storage.getItem(checkbox);
afterCheckboxChanged(checkbox);
});
selects.forEach(select => {
$(select).value = background.fisher.storage.getItem(select);
});
texts.forEach(text => {
$(text).value = background.fisher.storage.getItem(text);
});
}
chrome.runtime.getBackgroundPage(loadOptions);
/***/ })
/******/ });
\ No newline at end of file
This diff is collapsed.
{
"background": {
"persistent": true,
"scripts": [ "bundle/background.js" ]
},
"browser_action": {
"default_icon": "background/img/black.png",
"default_popup": "popup/popup.html",
"default_title": "Yandex Music Fisher mod by vectorserver"
},
"content_scripts": [ {
"js": [ "bundle/content.js" ],
"matches": [ "https://music.yandex.ru/*", "https://music.yandex.ua/*", "https://music.yandex.kz/*", "https://music.yandex.by/*", "https://radio.yandex.ru/*", "https://radio.yandex.ua/*", "https://radio.yandex.kz/*", "https://radio.yandex.by/*" ]
} ],
"description": "Скачивание музыки с сервисов Яндекс.Музыка и Яндекс.Радио",
"developer": {
"name": "anderey-bannikov"
},
"homepage_url": "https://vk.com/vectorserver",
"icons": {
"128": "background/img/icon.png"
},
"incognito": "split",
"manifest_version": 2,
"minimum_opera_version": "42.0",
"name": "Yandex Music Fisher vectorserver",
"options_ui": {
"chrome_style": true,
"open_in_tab": true,
"page": "options/options.html"
},
"permissions": [ "tabs", "downloads", "*://*/*" ],
"version": "2.1.129"
}
body {
margin-top: 0;
margin-left: 14px;
}
h3 {
margin-left: -18px;
}
select, input[type=text] {
width: 160px;
}
input[type=checkbox] {
margin-top: -4px;
margin-right: 8px;
}
table {
border-spacing: 0;
margin-left: 21px;
}
tbody::after {
content: '';
display: block;
height: 10px;
}
tr {
height: 28px;
}
td:nth-child(2) {
padding-left: 10px;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Yandex Music Fisher</title>
<link rel="stylesheet" href="options.css">
</head>
<body>
<table>
<tbody>
<tr>
<td colspan="2"><h3>Общее</h3></td>
</tr>
<tr>
<td>
<label for="downloadThreadCount">Количество одновременных загрузок:</label>
</td>
<td>
<select id="downloadThreadCount">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
</select>
</td>
</tr>
<tr>
<td colspan="2">
<label><input type="checkbox" id="singleClickDownload">Скачивать в одно нажатие</label>
</td>
</tr>
<tr>
<td>
<label><input type="checkbox" id="shouldUseFolder">Помещать загрузки в папку:</label>
</td>
<td>
<input type="text" id="folder">
</td>
</tr>
</tbody>
<tbody>
<tr>
<td colspan="2"><h3>Обложка</h3></td>
</tr>
<tr>
<td colspan="2">
<label><input type="checkbox" id="shouldDownloadCover">Скачивать обложку</label>
</td>
</tr>
<tr>
<td>
<label for="albumCoverSize">Размер обложки в папке с альбомами:</label>
</td>
<td>
<select id="albumCoverSize">
<option value="200x200">200x200</option>
<option value="300x300">300x300</option>
<option value="400x400">400x400</option>
<option value="460x460">460x460</option>
<option value="600x600">600x600</option>
<option value="700x700">700x700</option>
<option value="1000x1000">1000x1000</option>
</select>
</td>
</tr>
<tr>
<td>
<label for="albumCoverSizeId3">Размер обложки у треков в ID3 теге:</label>
</td>
<td>
<select id="albumCoverSizeId3">
<option value="200x200">200x200</option>
<option value="300x300">300x300</option>
<option value="400x400">400x400</option>
<option value="460x460">460x460</option>
<option value="600x600">600x600</option>
<option value="700x700">700x700</option>
<option value="1000x1000">1000x1000</option>
</select>
</td>
</tr>
</tbody>
<tbody>
<tr>
<td colspan="2"><h3>Названия файлов</h3></td>
</tr>
<tr>
<td colspan="2">
<label><input type="checkbox" id="enumerateAlbums">Нумеровать треки альбомов</label>
</td>
</tr>
<tr>
<td colspan="2">
<label><input type="checkbox" id="enumeratePlaylists">Нумеровать треки плейлистов</label>
</td>
</tr>
</tbody>
<tbody>
<tr>
<td colspan="2"><h3>Сброс настроек</h3></td>
</tr>
<tr>
<td>
<button id="btnReset">Сбросить настройки</button>
</td>
</tr>
</tbody>
</table>
<p>
Благодарности сюда:
<a href="https://yoomoney.ru/to/410011249842897">money.yandex.ru/to/410015711366474</a>
</p>
<script src="../bundle/options.js"></script>
</body>
</html>
body {
font-size: 12px;
}
label {
font-weight: normal;
}
input[type=checkbox] {
margin-right: 5px;
}
h4.albums, h4.compilations {
margin-bottom: 18px;
margin-left: 10px;
}
.container {
width: 36em;
padding: 15px;
}
.btn, .btn:active, .btn:hover {
outline: none !important;
}
.btn-xs {
padding: 0 5px 0;
font-size: 11px;
}
.panel {
border: none;
}
.panel-heading {
padding: 3px 10px;
}
.panel-body {
padding: 5px 10px;
}
.btn-toolbar {
margin-left: 0;
margin-bottom: 20px;
}
.alert {
margin-bottom: 0;
}
.label {
font-size: 11px;
}
.label-year {
margin-left: 18px;
font-weight: bold;
cursor: default;
font-size: 14px;
}
.text-container {
text-align: left;
}
.artist-container, .download-container {
text-align: center;
}
.download-container {
margin-top: 18px;
}
#preloader > img {
display: block;
margin: 25px auto;
}
#compilations, #albums {
margin-top: 50px;
}
#numOfTopTracks {
width: 45px;
}
.panel-albums .media,
.panel-compilations .media {
margin: 9px 0;
}
.panel-albums .panel-body,
.panel-compilations .panel-body {
padding: 5px 0 0 0;
}
.panel-albums .panel-body label,
.panel-compilations .panel-body label {
padding: 0 10px;
}
.panel-albums .panel-body label:hover,
.panel-compilations .panel-body label:hover {
background-color: #F5F5F5;
}
.panel-compilations {
margin-top: 18px;
}
input[type=checkbox].media-checkbox {
display: block;
float: left;
margin-top: 21px;
margin-right: 11px;
}
button.remove-btn,
button.restore-btn {
display: block;
float: right;
margin-left: 5px;
}
.pivas{
margin-bottom: 15px;
}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Yandex Music Fisher</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../vendor/bootstrap-3.3.6-dist/css/bootstrap.min.css">
<link rel="stylesheet" href="../vendor/bootstrap-3.3.6-dist/css/custom.css">
<link rel="stylesheet" href="popup.css">
</head>
<body>
<div class="container">
<div class="pivas alet text-right">
<small><a class="btn btn-danger btn-xs" target="_blank" href="https://yoomoney.ru/to/410011249842897">На пивас... ;)</a></small>
</div>
<div class="btn-toolbar">
<div class="pull-left">
<div class="btn-group">
<button type="button" class="btn btn-sm btn-primary active" id="addBtn" disabled>
<i class="glyphicon glyphicon-save"></i> Скачать
</button>
<button type="button" class="btn btn-sm btn-primary" id="downloadBtn" disabled>
<i class="glyphicon glyphicon-saved"></i> Загрузки
</button>
</div>
</div>
<div class="pull-right">
<div class="btn-group">
<button type="button" class="btn btn-sm btn-primary" id="downloadFolderBtn"
title="Открыть папку загрузок">
<i class="glyphicon glyphicon-folder-open"></i> &nbsp;Папка загрузок
</button>
<button type="button" class="btn btn-sm btn-primary" id="settingsBtn" title="Открыть настройки">
<i class="glyphicon glyphicon-cog"></i> Настройки
</button>
</div>
</div>
<div class="clearfix"></div>
</div>
<div id="preloader">
<img src="img/preloader.gif" alt="loading...">
</div>
<div id="addContainer" class="hidden">
<div class="text-container">
<div class="artist-container">
<h3 id="name"></h3>
<p id="info"></p>
</div>
<ul class="list-inline hidden">
<li>
<button id="downloadTopTracks" type="button" class="btn btn-sm btn-success btn-sm">
<i class="glyphicon glyphicon-star"></i> Скачать
</button>
</li>
<li><input type="number" id="numOfTopTracks" min="1" value="30" max="99"></li>
<li>лучших треков</li>
</ul>
<div id="albums"></div>
<div id="compilations"></div>
</div>
<div class="download-container">
<button id="startDownloadBtn" type="button" class="btn btn-sm btn-success" title="Скачать">
<i class="glyphicon glyphicon-save"></i> Скачать
</button>
</div>
</div>
<div id="downloadContainer" class="hidden"></div>
<div id="errorContainer" class="alert alert-warning hidden">
Ошибка. Попробуйте позже. Возможно вас заблокировал Яндекс -
вам нужно ввести капчу на любой странице Яндекс.Музыки.
</div>
<div class="text-right alert alert-success mt-5">
<strong>Авторизуйся, иначе скачаный трек будет всего 30 сек!!!</strong><br>
<small>mod by <a target="_blank" href="https://vk.com/vectorserver">Vectorserver</a> / donat: <a class="btn btn-danger btn-xs" target="_blank" href="https://yoomoney.ru/to/410011249842897">yoomoney</a></small>
</div>
</div>
<script src="../bundle/popup.js"></script>
</body>
</html>
This diff is collapsed.
.mt-5{
margin-top: 15px;
}
\ No newline at end of file
This diff is collapsed.
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 6);
/******/ })
/************************************************************************/
/******/ ({
/***/ 6:
/***/ (function(module, exports, __webpack_require__) {
/* global externalAPI */
if (false) {
chrome = browser;
}
function injectCode(func, action) {
const script = document.createElement('script');
script.textContent = `'use strict';try{(${func})('${action}');}catch(e){console.log('Fisher injected error',e);};`;
document.head.appendChild(script);
script.parentNode.removeChild(script);
}
function dispatchCurrentTrackUrl(action) {
let link;
const track = externalAPI.getCurrentTrack();
if (track && 'link' in track) {
link = track.link;
}
document.dispatchEvent(new CustomEvent('fisher_injected_event', {
detail: {action, link}
}));
}
chrome.runtime.onMessage.addListener((action) => {
switch (action) {
case 'getCurrentTrackUrl':
injectCode(dispatchCurrentTrackUrl, action);
break;
}
});
document.addEventListener('fisher_injected_event', (e) => chrome.runtime.sendMessage(e.detail));
/***/ })
/******/ });
\ No newline at end of file
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 7);
/******/ })
/************************************************************************/
/******/ ({
/***/ 7:
/***/ (function(module, exports, __webpack_require__) {
if (false) {
chrome = browser;
}
const $ = document.getElementById.bind(document);
const checkboxes = [
'shouldDownloadCover',
'enumerateAlbums',
'enumeratePlaylists',
'singleClickDownload',
'shouldUseFolder'
];
const selects = [
'downloadThreadCount',
'albumCoverSize',
'albumCoverSizeId3'
];
const texts = [
'folder'
];
let background;
window.addEventListener('error', e => {
background.console.warn(e.error.stack);
e.returnValue = false;
});
window.addEventListener('unhandledrejection', e => {
background.console.warn(e.reason);
e.returnValue = false;
});
function afterCheckboxChanged(checkbox) { // изменение UI
const checked = $(checkbox).checked;
if (checkbox === 'shouldDownloadCover') {
if (checked) {
$('albumCoverSize').removeAttribute('disabled');
} else {
$('albumCoverSize').setAttribute('disabled', 'disabled');
}
} else if (checkbox === 'shouldUseFolder') {
if (checked) {
$('folder').removeAttribute('disabled');
} else {
$('folder').setAttribute('disabled', 'disabled');
}
}
}
checkboxes.forEach(checkbox => {
$(checkbox).addEventListener('click', () => {
const checked = $(checkbox).checked;
background.fisher.storage.setItem(checkbox, checked);
afterCheckboxChanged(checkbox);
});
});
selects.forEach(select => {
$(select).addEventListener('click', () => {
let value = $(select).value;
if (select === 'downloadThreadCount') {
value = parseInt(value, 10);
}
background.fisher.storage.setItem(select, value);
});
});
texts.forEach(text => {
$(text).addEventListener('input', () => {
let value = $(text).value;
if (text === 'folder') {
value = background.fisher.utils.clearPath(value, true);
if (value === '') {
return; // не сохраняем
}
}
background.fisher.storage.setItem(text, value);
});
});
$('btnReset').addEventListener('click', () => {
background.fisher.storage.reset();
loadOptions(background);
});
function loadOptions(backgroundPage) {
background = backgroundPage;
checkboxes.forEach(checkbox => {
$(checkbox).checked = background.fisher.storage.getItem(checkbox);
afterCheckboxChanged(checkbox);
});
selects.forEach(select => {
$(select).value = background.fisher.storage.getItem(select);
});
texts.forEach(text => {
$(text).value = background.fisher.storage.getItem(text);
});
}
chrome.runtime.getBackgroundPage(loadOptions);
/***/ })
/******/ });
\ No newline at end of file
This diff is collapsed.
{
"background": {
"persistent": true,
"scripts": [ "bundle/background.js" ]
},
"browser_action": {
"default_icon": "background/img/black.png",
"default_popup": "popup/popup.html",
"default_title": "Yandex Music Fisher mod by vectorserver"
},
"content_scripts": [ {
"js": [ "bundle/content.js" ],
"matches": [ "https://music.yandex.ru/*", "https://music.yandex.ua/*", "https://music.yandex.kz/*", "https://music.yandex.by/*", "https://radio.yandex.ru/*", "https://radio.yandex.ua/*", "https://radio.yandex.kz/*", "https://radio.yandex.by/*" ]
} ],
"description": "Скачивание музыки с сервисов Яндекс.Музыка и Яндекс.Радио",
"developer": {
"name": "anderey-bannikov"
},
"homepage_url": "https://vk.com/vectorserver",
"icons": {
"128": "background/img/icon.png"
},
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA03h7rk4usIeTcWX5fEDGoyZ6CbsyajMcNDTBPB33vP+0kIfNavEL+LX8SRMzrRQSScGsWWE5JFyXNGyhIoMYFvGfUVzJY5sD6kCe66ZBpxgKLiXKahPlRZff33IzhqskBuexFc7ZegcnTpJW4XOOqfJez3sZqps7RhDsAEa64n/0jPzmBDfGEzbjvp2ydzJoy6FshDxh16kNYnhwAw8mBGN3WBV47uJirL7DeqFvT3V44DRe3lIbMfzwvsljpRfXRKGHc7yjopX57pNUp/TvRRiMLmTTzHbYGw69zROM/d+bCD6aLfGfNk6CiZWSCjvRgWm1JzJgpcp3ocCyq6pf0QIDAQAB",
"manifest_version": 2,
"minimum_opera_version": "42.0",
"name": "Yandex Music Fisher vectorserver",
"options_ui": {
"chrome_style": true,
"open_in_tab": true,
"page": "options/options.html"
},
"permissions": [ "tabs", "downloads", "*://*/*" ],
"update_url": "https://addons.mozilla.org/update/",
"version": "2.1.129"
}
body {
margin-top: 0;
margin-left: 14px;
}
h3 {
margin-left: -18px;
}
select, input[type=text] {
width: 160px;
}
input[type=checkbox] {
margin-top: -4px;
margin-right: 8px;
}
table {
border-spacing: 0;
margin-left: 21px;
}
tbody::after {
content: '';
display: block;
height: 10px;
}
tr {
height: 28px;
}
td:nth-child(2) {
padding-left: 10px;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Yandex Music Fisher</title>
<link rel="stylesheet" href="options.css">
</head>
<body>
<table>
<tbody>
<tr>
<td colspan="2"><h3>Общее</h3></td>
</tr>
<tr>
<td>
<label for="downloadThreadCount">Количество одновременных загрузок:</label>
</td>
<td>
<select id="downloadThreadCount">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
</select>
</td>
</tr>
<tr>
<td colspan="2">
<label><input type="checkbox" id="singleClickDownload">Скачивать в одно нажатие</label>
</td>
</tr>
<tr>
<td>
<label><input type="checkbox" id="shouldUseFolder">Помещать загрузки в папку:</label>
</td>
<td>
<input type="text" id="folder">
</td>
</tr>
</tbody>
<tbody>
<tr>
<td colspan="2"><h3>Обложка</h3></td>
</tr>
<tr>
<td colspan="2">
<label><input type="checkbox" id="shouldDownloadCover">Скачивать обложку</label>
</td>
</tr>
<tr>
<td>
<label for="albumCoverSize">Размер обложки в папке с альбомами:</label>
</td>
<td>
<select id="albumCoverSize">
<option value="200x200">200x200</option>
<option value="300x300">300x300</option>
<option value="400x400">400x400</option>
<option value="460x460">460x460</option>
<option value="600x600">600x600</option>
<option value="700x700">700x700</option>
<option value="1000x1000">1000x1000</option>
</select>
</td>
</tr>
<tr>
<td>
<label for="albumCoverSizeId3">Размер обложки у треков в ID3 теге:</label>
</td>
<td>
<select id="albumCoverSizeId3">
<option value="200x200">200x200</option>
<option value="300x300">300x300</option>
<option value="400x400">400x400</option>
<option value="460x460">460x460</option>
<option value="600x600">600x600</option>
<option value="700x700">700x700</option>
<option value="1000x1000">1000x1000</option>
</select>
</td>
</tr>
</tbody>
<tbody>
<tr>
<td colspan="2"><h3>Названия файлов</h3></td>
</tr>
<tr>
<td colspan="2">
<label><input type="checkbox" id="enumerateAlbums">Нумеровать треки альбомов</label>
</td>
</tr>
<tr>
<td colspan="2">
<label><input type="checkbox" id="enumeratePlaylists">Нумеровать треки плейлистов</label>
</td>
</tr>
</tbody>
<tbody>
<tr>
<td colspan="2"><h3>Сброс настроек</h3></td>
</tr>
<tr>
<td>
<button id="btnReset">Сбросить настройки</button>
</td>
</tr>
</tbody>
</table>
<p>
Благодарности сюда:
<a href="https://yoomoney.ru/to/410011249842897">money.yandex.ru/to/410015711366474</a>
</p>
<script src="../bundle/options.js"></script>
</body>
</html>
body {
font-size: 12px;
}
label {
font-weight: normal;
}
input[type=checkbox] {
margin-right: 5px;
}
h4.albums, h4.compilations {
margin-bottom: 18px;
margin-left: 10px;
}
.container {
width: 36em;
padding: 15px;
}
.btn, .btn:active, .btn:hover {
outline: none !important;
}
.btn-xs {
padding: 0 5px 0;
font-size: 11px;
}
.panel {
border: none;
}
.panel-heading {
padding: 3px 10px;
}
.panel-body {
padding: 5px 10px;
}
.btn-toolbar {
margin-left: 0;
margin-bottom: 20px;
}
.alert {
margin-bottom: 0;
}
.label {
font-size: 11px;
}
.label-year {
margin-left: 18px;
font-weight: bold;
cursor: default;
font-size: 14px;
}
.text-container {
text-align: left;
}
.artist-container, .download-container {
text-align: center;
}
.download-container {
margin-top: 18px;
}
#preloader > img {
display: block;
margin: 25px auto;
}
#compilations, #albums {
margin-top: 50px;
}
#numOfTopTracks {
width: 45px;
}
.panel-albums .media,
.panel-compilations .media {
margin: 9px 0;
}
.panel-albums .panel-body,
.panel-compilations .panel-body {
padding: 5px 0 0 0;
}
.panel-albums .panel-body label,
.panel-compilations .panel-body label {
padding: 0 10px;
}
.panel-albums .panel-body label:hover,
.panel-compilations .panel-body label:hover {
background-color: #F5F5F5;
}
.panel-compilations {
margin-top: 18px;
}
input[type=checkbox].media-checkbox {
display: block;
float: left;
margin-top: 21px;
margin-right: 11px;
}
button.remove-btn,
button.restore-btn {
display: block;
float: right;
margin-left: 5px;
}
.pivas{
margin-bottom: 15px;
}
\ No newline at end of file
This diff is collapsed.
.mt-5{
margin-top: 15px;
}
\ No newline at end of file
Плагин для скачивания музыки с сервиса https://music.yandex.ru/
Расширение для браузеров Opera и Google Chrome
Расширение для браузеров Opera, Firefox, Microsoft EDGE
**Пакеты:**
* Opera [Beta & developer](https://www.opera.com/ru/computer/beta): [link](https://addons.opera.com/ru/extensions/details/yandex-music-fisher-mod/)
* Firefox: [link](https://addons.mozilla.org/ru/firefox/addon/yandex-music-vectorserver/)
* Microsoft EDGE: [link](https://microsoftedge.microsoft.com/addons/detail/yandex-music-fisher-vecto/hpikmohamcoejcfekplfhfodcifbammm)
**Установка:**
**Установка ZIP:**
* Качаем архив и распаковываем его куда вам удобно: [master.zip](https://github.com/vectorserver/yandex_music_fisher_mod/archive/master.zip)
* Заходим в "Расширения" [opera://extensions/](opera://extensions/)
* Включаем "Режим разработчика"
......