/*
* @title Gポンごにょごにょ補助
* @description !!!TEST!!!
* @include http://site.garapon.tv/*
* @license MIT License
* @require
*/
//(function () {
var ln=function(o,n,l,t) { var dl=$('<a>'); dl.attr({download:n,href:l}).text(t);o.after(dl); return true;}
var ss=function(k,v,ex){var ex=$.now()+ex*1000;var d={ex:ex,v:v};localStorage.setItem(k,JSON.stringify(d));}
var ld=function(k){var d=localStorage[k];if(!d){return undefined;}d=JSON.parse(d);if(d.ex===false||d.ex>$.now()){return d.v;}else{localStorage.removeItem(k);return undefined;}}
var hz=function(vc){ return String.fromCharCode(vc.charCodeAt(0) + 65248); }
var SKEY='gpon_temp';
var s = ld(SKEY);
if (!s) {
s = prompt('set baseuri','');
ss(SKEY,s,7200);
}
var ID = $('button.btn-like-num').attr('gtvid');
var U = s.replace(/>vid=[^&]+/,'')+'>vid='+ID;
var N = $("meta[property='og:title']").attr('content').replace(/:/g,function(a){return hz(a)})+' '+ID;
ln($('#program_table'),N,U,N);
//})();