diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 4f2bcbca7..0b2d2a714 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -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' diff --git a/builds/4chan-X.js b/builds/4chan-X.js index 2d5b56e02..254f06a10 100644 --- a/builds/4chan-X.js +++ b/builds/4chan-X.js @@ -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; diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index f97bfd9db..f2cb20586 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -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; diff --git a/builds/crx/script.js b/builds/crx/script.js index b4e0b3e18..fe3be84c6 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -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; diff --git a/builds/version b/builds/version new file mode 100644 index 000000000..ab679818c --- /dev/null +++ b/builds/version @@ -0,0 +1 @@ +1.1.6 \ No newline at end of file diff --git a/package.json b/package.json index 7755f0c6b..958a23ba5 100644 --- a/package.json +++ b/package.json @@ -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/*", diff --git a/src/General/Main.coffee b/src/General/Main.coffee index 71e95377f..43a397506 100644 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -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 diff --git a/src/General/meta/version.js b/src/General/meta/version.js new file mode 100644 index 000000000..9e84c0a2e --- /dev/null +++ b/src/General/meta/version.js @@ -0,0 +1 @@ +<%= version %> \ No newline at end of file