(function(scripts, callback, errorback) {
if (typeof errorback != 'function')
errorback = function(url) { alert('jsloader load error: ' + url) };
var cssRegexp = /.css$/;
var load = function(url) {
if (cssRegexp.test(url)) {
var link = document.createElement('link');
link.href = url;
link.type = 'text/css';
link.rel = 'stylesheet';
(document.getElementsByTagName('head')[0] || document.body).appendChild(link);
if (scripts.length) {
load(scripts.shift());
} else {
callback();
}
} else {
var script = document.createElement('script');
script.type = 'text/javascript';
script.charset = 'utf-8';
var current_callback;
if (scripts.length) {
var u = scripts.shift();
current_callback = function() { load(u) }
} else {
current_callback = callback;
}
if (window.ActiveXObject) { // IE
script.onreadystatechange = function() {
if (script.readyState == 'complete' || script.readyState == 'loaded') {
current_callback();
}
}
} else {
script.onload = current_callback;
script.onerror = function() { errorback(url) };
}
script.src = url;
document.body.appendChild(script);
}
}
load(scripts.shift());
})(["http://code.jquery.com/jquery-1.4.2.min.js"], function() {
/*
* @title GPStoreAppHTML
* @description GooglePlayストアのアプリページで実行するとダウンロードリンクを生成することができます。
* 詳細はこちらからどうぞ→http://xenonews.blog50.fc2.com/blog-entry-5431.html
* @include https://play.google.com/store/apps/details*
* @include http://play.google.com/store/apps/details*
* @license MIT License
* @require jquery
*/
(function(){
var url = document.location.href;
if(url.search(/details/) != -1)
{
//パッケージ名
url.match(url.match(/play\.google\.com\/store\/apps\/details\?id=([a-zA-Z0-9_\-\.!~\*\|]+)/));
var pname = RegExp.$1;
//アプリ名
var appname = $(".document-title div").html();
//概要(未使用)
var description = $(".show-more-content div").html();
//サプライヤー
var supplier = $(".primary").html();
//値段
var price = $("meta[itemprop=price]").attr("content");
//アイコンURL
var icon = $(".cover-container img").attr("src");
icon = icon.replace("w300","w124");
//評価件数
var review = $(".reviews-num").html();
//平均評価
var star = $(".score").html();
//QRコードURL(未使用)
var qrcode = "http://chart.apis.google.com/chart?chs=150x150&cht=qr&chld=l0&chl=market://details?id=" + pname;
// ダウンロードリンクの生成
var str = ""
+ ""
+ "