Check for updates

This commit is contained in:
Jordan Bates 2013-05-01 11:30:23 -07:00
parent a8a1df70df
commit 9c0dd570dd
8 changed files with 11 additions and 7 deletions

View File

@ -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'

View File

@ -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;

View File

@ -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;

View File

@ -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
View File

@ -0,0 +1 @@
1.1.6

View File

@ -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/*",

View File

@ -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

View File

@ -0,0 +1 @@
<%= version %>