mirror of
https://bitbucket.org/skobkin/chrome_point_plus.git
synced 2024-11-23 18:56:04 +00:00
Add info about Nokita server to options
This commit is contained in:
parent
795298c94f
commit
358d44b3bd
|
@ -60,7 +60,7 @@
|
||||||
"message": "Enable embedding ▼"
|
"message": "Enable embedding ▼"
|
||||||
},
|
},
|
||||||
"option_images_load_booru": {
|
"option_images_load_booru": {
|
||||||
"message": "Load pictures from Booru, Tumblr, etc"
|
"message": "Load pictures from Booru, Tumblr, etc via NokitaKaze server"
|
||||||
},
|
},
|
||||||
"option_audios_parse_links": {
|
"option_audios_parse_links": {
|
||||||
"message": "Audio from direct links"
|
"message": "Audio from direct links"
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
"message": "Включить встраивание ▼"
|
"message": "Включить встраивание ▼"
|
||||||
},
|
},
|
||||||
"option_images_load_booru": {
|
"option_images_load_booru": {
|
||||||
"message": "Загружать картинки с Booru, Tumblr и т.п."
|
"message": "Загружать картинки с Booru, Tumblr и т.п. через сервер Никиты"
|
||||||
},
|
},
|
||||||
"option_audios_parse_links": {
|
"option_audios_parse_links": {
|
||||||
"message": "Аудио по прямой ссылке"
|
"message": "Аудио по прямой ссылке"
|
||||||
|
|
|
@ -16,6 +16,7 @@ function Booru($links, options) {
|
||||||
*/
|
*/
|
||||||
Booru.baseUrl = 'https://api.kanaria.ru/point/get_booru_picture.php';
|
Booru.baseUrl = 'https://api.kanaria.ru/point/get_booru_picture.php';
|
||||||
|
|
||||||
|
/* jshint maxlen:false */
|
||||||
Booru.services = {
|
Booru.services = {
|
||||||
danbooru: {
|
danbooru: {
|
||||||
mask: new RegExp('^https?://danbooru\\.donmai\\.us/posts/([0-9]+)', 'i'),
|
mask: new RegExp('^https?://danbooru\\.donmai\\.us/posts/([0-9]+)', 'i'),
|
||||||
|
@ -50,13 +51,14 @@ Booru.services = {
|
||||||
},
|
},
|
||||||
pixiv: {
|
pixiv: {
|
||||||
mask: new RegExp('^https?://(www\\.)?pixiv\\.net\\/member_illust\\.php\\?mode\\=medium\\&illust_id\\=([0-9]+)', 'i'),
|
mask: new RegExp('^https?://(www\\.)?pixiv\\.net\\/member_illust\\.php\\?mode\\=medium\\&illust_id\\=([0-9]+)', 'i'),
|
||||||
matchNumber: 2,
|
matchNumber: 2
|
||||||
},
|
},
|
||||||
animepicturesnet: {
|
animepicturesnet: {
|
||||||
mask: new RegExp('^http\\:\\/\\/anime\\-pictures\\.net\\/pictures\\/view_post\\/([0-9]+)', 'i'),
|
mask: new RegExp('^http\\:\\/\\/anime\\-pictures\\.net\\/pictures\\/view_post\\/([0-9]+)', 'i'),
|
||||||
matchNumber: 1
|
matchNumber: 1
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
/* jshint maxlen:120 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Обрабатывает все картинки
|
* Обрабатывает все картинки
|
||||||
|
@ -110,7 +112,7 @@ Booru.prototype.createImageFromService = function(service, href) {
|
||||||
if (serviceInfo.params) {
|
if (serviceInfo.params) {
|
||||||
for (key in serviceInfo.params) {
|
for (key in serviceInfo.params) {
|
||||||
if (serviceInfo.params.hasOwnProperty(key)) {
|
if (serviceInfo.params.hasOwnProperty(key)) {
|
||||||
params[key] = mathes[serviceInfo.params[key]];
|
params[key] = matches[serviceInfo.params[key]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +167,6 @@ Booru.prototype.createImage = function(service, id, params) {
|
||||||
Booru.prototype.getImageLink = function(service, id, params) {
|
Booru.prototype.getImageLink = function(service, id, params) {
|
||||||
return this.constructor.baseUrl + '?' + $.param($.extend({
|
return this.constructor.baseUrl + '?' + $.param($.extend({
|
||||||
domain: service,
|
domain: service,
|
||||||
id: id,
|
id: id
|
||||||
}, params));
|
}, params));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue