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'
|
||||
|
||||
license:
|
||||
meta:
|
||||
options: concatOptions
|
||||
files:
|
||||
'LICENSE': 'src/General/meta/banner.js'
|
||||
'LICENSE': 'src/General/meta/banner.js',
|
||||
'builds/version': 'src/General/meta/version.js'
|
||||
|
||||
crx:
|
||||
options: concatOptions
|
||||
@ -85,7 +86,7 @@ module.exports = (grunt) ->
|
||||
|
||||
concurrent:
|
||||
build: [
|
||||
'concat:license'
|
||||
'concat:meta'
|
||||
'build-crx'
|
||||
'build-userjs'
|
||||
'build-userscript'
|
||||
|
||||
@ -10048,7 +10048,7 @@
|
||||
if (items.lastupdate > now - freq || items.lastchecked > now - $.DAY) {
|
||||
return;
|
||||
}
|
||||
return $.ajax('http://seaweedchan.github.io/4chan-x/version', {
|
||||
return $.ajax('https://github.com/seaweedchan/4chan-x/raw/master/builds/version', {
|
||||
onload: function() {
|
||||
var el, version;
|
||||
|
||||
|
||||
@ -10071,7 +10071,7 @@
|
||||
if (items.lastupdate > now - freq || items.lastchecked > now - $.DAY) {
|
||||
return;
|
||||
}
|
||||
return $.ajax('http://seaweedchan.github.io/4chan-x/version', {
|
||||
return $.ajax('https://github.com/seaweedchan/4chan-x/raw/master/builds/version', {
|
||||
onload: function() {
|
||||
var el, version;
|
||||
|
||||
|
||||
@ -10052,7 +10052,7 @@
|
||||
if (items.lastupdate > now - freq || items.lastchecked > now - $.DAY) {
|
||||
return;
|
||||
}
|
||||
return $.ajax('http://seaweedchan.github.io/4chan-x/version', {
|
||||
return $.ajax('https://github.com/seaweedchan/4chan-x/raw/master/builds/version', {
|
||||
onload: function() {
|
||||
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",
|
||||
"repo": "https://github.com/seaweedchan/4chan-x/",
|
||||
"page": "http://seaweedchan.github.io/4chan-x/",
|
||||
"buildsPath": "builds/",
|
||||
"mainBranch": "master",
|
||||
"matches": [
|
||||
"*://api.4chan.org/*",
|
||||
|
||||
@ -289,7 +289,7 @@ Main =
|
||||
$.get items, (items) ->
|
||||
if items.lastupdate > now - freq or items.lastchecked > now - $.DAY
|
||||
return
|
||||
$.ajax '<%= meta.page %><%= meta.buildsPath %>version', onload: ->
|
||||
$.ajax '<%= meta.repo %>raw/<%= meta.mainBranch %>/<%= meta.buildsPath %>version', onload: ->
|
||||
return unless @status is 200
|
||||
version = @response
|
||||
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