Check for updates
This commit is contained in:
parent
a8a1df70df
commit
9c0dd570dd
@ -38,10 +38,11 @@ module.exports = (grunt) ->
|
|||||||
]
|
]
|
||||||
dest: 'tmp-<%= pkg.type %>/script.coffee'
|
dest: 'tmp-<%= pkg.type %>/script.coffee'
|
||||||
|
|
||||||
license:
|
meta:
|
||||||
options: concatOptions
|
options: concatOptions
|
||||||
files:
|
files:
|
||||||
'LICENSE': 'src/General/meta/banner.js'
|
'LICENSE': 'src/General/meta/banner.js',
|
||||||
|
'builds/version': 'src/General/meta/version.js'
|
||||||
|
|
||||||
crx:
|
crx:
|
||||||
options: concatOptions
|
options: concatOptions
|
||||||
@ -85,7 +86,7 @@ module.exports = (grunt) ->
|
|||||||
|
|
||||||
concurrent:
|
concurrent:
|
||||||
build: [
|
build: [
|
||||||
'concat:license'
|
'concat:meta'
|
||||||
'build-crx'
|
'build-crx'
|
||||||
'build-userjs'
|
'build-userjs'
|
||||||
'build-userscript'
|
'build-userscript'
|
||||||
|
|||||||
@ -10048,7 +10048,7 @@
|
|||||||
if (items.lastupdate > now - freq || items.lastchecked > now - $.DAY) {
|
if (items.lastupdate > now - freq || items.lastchecked > now - $.DAY) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return $.ajax('http://seaweedchan.github.io/4chan-x/version', {
|
return $.ajax('https://github.com/seaweedchan/4chan-x/raw/master/builds/version', {
|
||||||
onload: function() {
|
onload: function() {
|
||||||
var el, version;
|
var el, version;
|
||||||
|
|
||||||
|
|||||||
@ -10071,7 +10071,7 @@
|
|||||||
if (items.lastupdate > now - freq || items.lastchecked > now - $.DAY) {
|
if (items.lastupdate > now - freq || items.lastchecked > now - $.DAY) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return $.ajax('http://seaweedchan.github.io/4chan-x/version', {
|
return $.ajax('https://github.com/seaweedchan/4chan-x/raw/master/builds/version', {
|
||||||
onload: function() {
|
onload: function() {
|
||||||
var el, version;
|
var el, version;
|
||||||
|
|
||||||
|
|||||||
@ -10052,7 +10052,7 @@
|
|||||||
if (items.lastupdate > now - freq || items.lastchecked > now - $.DAY) {
|
if (items.lastupdate > now - freq || items.lastchecked > now - $.DAY) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return $.ajax('http://seaweedchan.github.io/4chan-x/version', {
|
return $.ajax('https://github.com/seaweedchan/4chan-x/raw/master/builds/version', {
|
||||||
onload: function() {
|
onload: function() {
|
||||||
var el, version;
|
var el, version;
|
||||||
|
|
||||||
|
|||||||
1
builds/version
Normal file
1
builds/version
Normal file
@ -0,0 +1 @@
|
|||||||
|
1.1.6
|
||||||
@ -6,6 +6,7 @@
|
|||||||
"name": "4chan X",
|
"name": "4chan X",
|
||||||
"repo": "https://github.com/seaweedchan/4chan-x/",
|
"repo": "https://github.com/seaweedchan/4chan-x/",
|
||||||
"page": "http://seaweedchan.github.io/4chan-x/",
|
"page": "http://seaweedchan.github.io/4chan-x/",
|
||||||
|
"buildsPath": "builds/",
|
||||||
"mainBranch": "master",
|
"mainBranch": "master",
|
||||||
"matches": [
|
"matches": [
|
||||||
"*://api.4chan.org/*",
|
"*://api.4chan.org/*",
|
||||||
|
|||||||
@ -289,7 +289,7 @@ Main =
|
|||||||
$.get items, (items) ->
|
$.get items, (items) ->
|
||||||
if items.lastupdate > now - freq or items.lastchecked > now - $.DAY
|
if items.lastupdate > now - freq or items.lastchecked > now - $.DAY
|
||||||
return
|
return
|
||||||
$.ajax '<%= meta.page %><%= meta.buildsPath %>version', onload: ->
|
$.ajax '<%= meta.repo %>raw/<%= meta.mainBranch %>/<%= meta.buildsPath %>version', onload: ->
|
||||||
return unless @status is 200
|
return unless @status is 200
|
||||||
version = @response
|
version = @response
|
||||||
return unless /^\d\.\d+\.\d+$/.test version
|
return unless /^\d\.\d+\.\d+$/.test version
|
||||||
|
|||||||
1
src/General/meta/version.js
Normal file
1
src/General/meta/version.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
<%= version %>
|
||||||
Loading…
x
Reference in New Issue
Block a user