Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release/1.0.2' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
cawa-93 committed Aug 8, 2019
2 parents f8b5ce6 + cc80b87 commit 89da93b
Show file tree
Hide file tree
Showing 61 changed files with 11,544 additions and 10,996 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,5 @@ fabric.properties
*.zip


dist
dist
\.idea/
109 changes: 0 additions & 109 deletions .gitlab-ci.yml

This file was deleted.

53 changes: 53 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Конфик сделан по примеру
# https://github.com/vuetifyjs/vuetify/blob/aed4309f6e845b64d97a7b43f4275a36526bab04/.travis.yml

sudo: false

language: node_js

node_js:
- "10"

stages:
- test
- name: deploy
if: (tag IS present) AND (type = push) AND (repo = cawa-93/play-shikimori-online)

jobs:
include:
- stage: test
name: "Test"
script:
- npm run lint
- npm test

- stage: deploy
name: "Deploy"
script:
- NODE_ENV=production BROWSER=chrome npm run build
- NODE_ENV=production BROWSER=firefox npm run build
deploy:
- provider: script
script: node deploy/chrome.js
skip_cleanup: true
on:
repo: cawa-93/play-shikimori-online
tags: true

- provider: script
script: node deploy/firefox.js
skip_cleanup: true
on:
repo: cawa-93/play-shikimori-online
tags: true

- provider: releases
file:
- chrome.zip
- firefox.zip
api_key: $GITHUB_OAUTH_TOKEN
draft: true
skip_cleanup: true
on:
repo: cawa-93/play-shikimori-online
tags: true
189 changes: 93 additions & 96 deletions build/generate_manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,112 +3,109 @@ const package = JSON.parse(fs.readFileSync('./package.json'))
const browser = process.env.BROWSER ? process.env.BROWSER : 'chrome'

const manimest = {
manifest_version: 2,

name: 'Play Шикимори Online',
description: package.description,
version: package.version,

homepage_url: 'https://shikimori.one/clubs/2372',
author: package.author,
icons: {
"192": "icons/play.png",
"128": "icons/play-128.png"
},

minimum_chrome_version: "73",

incognito: 'split',

browser_action: {
default_title: "Открыть историю просмотров"
},

background: {
scripts: [
"background/background.js"
],
persistent: true
},

content_security_policy: "script-src 'self' 'unsafe-eval' https://ssl.google-analytics.com https://www.google-analytics.com; object-src 'self'",


web_accessible_resources: [
"UI/*",
"content-scripts/anime365-player-events.js"
],


content_scripts: [{
matches: [
"https://shikimori.org/*",
"https://shikimori.one/*"
],
js: [
"content-scripts/watch-button.js"
],
run_at: "document_idle"
}, {
matches: [
"https://smotretanime.ru/translations/embed/*",
"https://smotret-anime-365.ru/translations/embed/*",
"https://hentai365.ru/translations/embed/*"
],
js: [
"content-scripts/inject-content-scripts.js"
],
css: [
"content-scripts/anime365-player-styles.css"
],
run_at: "document_end",
all_frames: true
}, {
matches: [
"https://myanimelist.net/anime/*"
],
js: [
"content-scripts/myanimelist.js"
],
css: [
"content-scripts/myanimelist.css"
],
run_at: "document_end"
}
],
permissions: [
"https://shikimori.one/*",
"https://shikimori.org/*",
"https://smotretanime.ru/*",
"https://smotret-anime-365.ru/*",
"https://api.jikan.moe/*",
"webRequest",
"webRequestBlocking",
"storage",
"tabs"
],
manifest_version: 2,

name: 'Play Шикимори Online',
description: package.description,
version: package.version,

homepage_url: 'https://shikimori.one/clubs/2372',
author: package.author,
icons: {
'192': 'icons/play.png',
'128': 'icons/play-128.png',
},

minimum_chrome_version: '73',

incognito: 'split',

browser_action: {
default_title: 'Открыть историю просмотров',
},

background: {
scripts: [
'background/background.js',
],
persistent: true,
},

content_security_policy: 'script-src \'self\' \'unsafe-eval\' https://ssl.google-analytics.com https://www.google-analytics.com; object-src \'self\'',


web_accessible_resources: [
'UI/*',
'content-scripts/anime365-player-events.js',
],


content_scripts: [
{
matches: [
'https://shikimori.org/*',
'https://shikimori.one/*',
],
js: [
'content-scripts/watch-button.js',
],
run_at: 'document_idle',
}, {
matches: [
'https://smotretanime.ru/translations/embed/*',
'https://smotret-anime-365.ru/translations/embed/*',
'https://hentai365.ru/translations/embed/*',
],
js: [
'content-scripts/inject-content-scripts.js',
],
css: [
'content-scripts/anime365-player-styles.css',
],
run_at: 'document_end',
all_frames: true,
}, {
matches: [
'https://myanimelist.net/anime/*',
],
js: [
'content-scripts/myanimelist.js',
],
css: [
'content-scripts/myanimelist.css',
],
run_at: 'document_end',
},
],
permissions: [
'https://shikimori.one/*',
'https://shikimori.org/*',
'https://smotretanime.ru/*',
'https://smotret-anime-365.ru/*',
'https://api.jikan.moe/*',
'webRequest',
'webRequestBlocking',
'storage',
'tabs',
],
}




if (browser === 'firefox') {

manimest.browser_specific_settings = {
gecko: {
id: process.env.FIREFOX_EXTENSION_ID,
strict_min_version: "67.0"
}
}
manimest.browser_specific_settings = {
gecko: {
id: process.env.FIREFOX_EXTENSION_ID,
strict_min_version: '67.0',
},
}

manimest.incognito = 'spanning'
manimest.incognito = 'spanning'

}



// ...package



fs.writeFileSync(`dist/${browser}/manifest.json`, JSON.stringify(manimest), { flag: 'w+' })
fs.writeFileSync(`dist/${browser}/manifest.json`, JSON.stringify(manimest), {flag: 'w+'})
Loading

0 comments on commit 89da93b

Please sign in to comment.