This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('KEY_CHARS', 'ACEFGHJKPQRSTWXYZ23456789'); // characters which cannot be confused phonetically or by bad handwriting | |
function generate_code($len = 6) { | |
$k = str_repeat('.', $len); | |
while ($len--) { | |
$k[$len] = substr(KEY_CHARS, mt_rand(0, strlen(KEY_CHARS) - 1), 1); | |
} | |
return $k; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*------------------------------------------------------------ | |
Required plugins | |
------------------------------------------------------------*/ | |
var gulp = require('gulp'), | |
sass = require('gulp-sass'), | |
postcss = require('gulp-postcss'), | |
autoprefixer = require('autoprefixer'), | |
concat = require('gulp-concat'), | |
uglify = require('gulp-uglify'), | |
imagemin = require('gulp-imagemin'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var common = [], uncommon = [], rare = [], veryRare = [], extremelyRare = [], chase = [], variant = [], itemGrid, items; | |
itemGrid = $("div.pod ul.item-list"); | |
items = itemGrid.children(); | |
items.each(function(i,e){ | |
var rarity; | |
if($(this).find("div.thumb ul.attributes li.rarity i").attr("title")) { | |
rarity = $(this).find("div.thumb ul.attributes li.rarity i").attr("title"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var common = [], uncommon = [], rare = [], veryRare = [], extremelyRare = [], chase = [], variant = [], itemType, itemWrap, items; | |
if(document.getElementsByClassName('collection').getElementsByClassName('item-grid')){ | |
itemWrap = $("div.collection ul.item-grid"); | |
itemType = "grid"; | |
} | |
if(document.getElementsByClassName('pod').getElementsByClassName('item-list')){ | |
itemWrap = $("div.pod ul.item-list"); | |
itemType = "list"; | |
} |