MCPcopy Create free account
hub / github.com/hoothin/UserScripts / register_qrcode_event

Function register_qrcode_event

HacgGodTurn/HacgGodTurn.user.js:927–930  ·  view source on GitHub ↗
(sel, sel_enlarged)

Source from the content-addressed store, hash-verified

925 $('#qrcode_download').removeAttr('href').text('种子扫码');
926 $('#qrcode_magnet_enlarged').attr('qr_content', magnet_url.full);
927 $('#qrcode_download_enlarged').attr('qr_content', torrent_url.lite); var register_qrcode_event = function(sel, sel_enlarged) { $(sel).click(function() { $('.qrcode_enlarged').html('').hide();
928 $(sel_enlarged).qrcode({ render: "canvas", size: 256, fill: '#0480BE', background: '#FFF', quiet: 1, mode: 2, minVersion: 10, label: $(sel_enlarged).attr('qr_label'), fontname: '"Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif', fontcolor: 'darkorange', text: $(sel_enlarged).attr('qr_content') });
929 $(sel_enlarged).fadeIn(200); });
930 $(sel_enlarged).click(function() { $(this).hide(); }); };
931 $(document).ready(function() { register_qrcode_event('#qrcode_magnet', '#qrcode_magnet_enlarged');
932 register_qrcode_event('#qrcode_download', '#qrcode_download_enlarged'); }); } else if (Config['user_script']['platform'] == 'mobile') { $('#torrent_url').attr('href', torrent_url.full).text('种子下载').click(function() { return (prompt('确认下载该种子', torrent_url.full) ? true : false); });
933 $('#magnet_url').attr('href', magnet_url.full).text('磁力下载').click(function() { return (prompt('确认下载磁链', magnet_url.full) ? true : false); }); } else { return false; }

Callers 1

Calls 1

$Function · 0.50

Tested by

no test coverage detected