Compare commits
3 commits
04ffc30e92
...
1972ecf043
Author | SHA1 | Date | |
---|---|---|---|
1972ecf043 | |||
30e757b050 | |||
af8dd42830 |
5 changed files with 12 additions and 7 deletions
|
@ -1,5 +1,14 @@
|
||||||
var DEBUG = document.location.search.substr(0, 6) == "?debug";
|
var DEBUG = document.location.search.substr(0, 6) == "?debug";
|
||||||
|
|
||||||
|
function petThumbnailUrl(pet_name) {
|
||||||
|
// if first character is "@", use the hash url
|
||||||
|
if (pet_name[0] == "@") {
|
||||||
|
return "https://pets.neopets.com/cp/" + pet_name.substr(1) + "/1/1.png";
|
||||||
|
}
|
||||||
|
|
||||||
|
return "https://pets.neopets.com/cpn/" + pet_name + "/1/1.png";
|
||||||
|
}
|
||||||
|
|
||||||
/* Needed items form */
|
/* Needed items form */
|
||||||
(function () {
|
(function () {
|
||||||
var UI = {};
|
var UI = {};
|
||||||
|
@ -65,10 +74,6 @@ var DEBUG = document.location.search.substr(0, 6) == "?debug";
|
||||||
loadItems(data.query);
|
loadItems(data.query);
|
||||||
}
|
}
|
||||||
|
|
||||||
function petThumbnailUrl(pet_name) {
|
|
||||||
return "https://pets.neopets.com/cpn/" + pet_name + "/1/1.png";
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Items */
|
/* Items */
|
||||||
|
|
||||||
function loadItems(query) {
|
function loadItems(query) {
|
||||||
|
@ -127,7 +132,7 @@ var DEBUG = document.location.search.substr(0, 6) == "?debug";
|
||||||
|
|
||||||
function Pet(name) {
|
function Pet(name) {
|
||||||
var el = $("#bulk-pets-submission-template")
|
var el = $("#bulk-pets-submission-template")
|
||||||
.tmpl({ pet_name: name })
|
.tmpl({ pet_name: name, pet_thumbnail: petThumbnailUrl(name) })
|
||||||
.appendTo(queue_el);
|
.appendTo(queue_el);
|
||||||
|
|
||||||
this.load = function () {
|
this.load = function () {
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
<%= javascript_include_tag 'https://analytics.openneo.net/js/script.js',
|
<%= javascript_include_tag 'https://analytics.openneo.net/js/script.js',
|
||||||
defer: true, 'data-domain': 'impress.openneo.net' %>
|
async: true, 'data-domain': 'impress.openneo.net' %>
|
|
@ -68,7 +68,7 @@
|
||||||
|
|
||||||
%script#bulk-pets-submission-template{:type => 'text/x-jquery/tmpl'}
|
%script#bulk-pets-submission-template{:type => 'text/x-jquery/tmpl'}
|
||||||
%li.waiting
|
%li.waiting
|
||||||
%img{:src => 'https://pets.neopets.com/cpn/${pet_name}/1/1.png'}
|
%img{:src => '${pet_thumbnail}'}
|
||||||
%span.name ${pet_name}
|
%span.name ${pet_name}
|
||||||
%span.waiting-message= t '.bulk_pets.waiting'
|
%span.waiting-message= t '.bulk_pets.waiting'
|
||||||
%span.loading-message= t '.bulk_pets.loading'
|
%span.loading-message= t '.bulk_pets.loading'
|
||||||
|
|
BIN
vendor/cache/ffi-1.17.0-x86_64-linux-gnu.gem
vendored
Normal file
BIN
vendor/cache/ffi-1.17.0-x86_64-linux-gnu.gem
vendored
Normal file
Binary file not shown.
BIN
vendor/cache/nokogiri-1.16.7-x86_64-linux.gem
vendored
Normal file
BIN
vendor/cache/nokogiri-1.16.7-x86_64-linux.gem
vendored
Normal file
Binary file not shown.
Loading…
Reference in a new issue