<commit_before>/** @licence <https://raw.githubusercontent.com/mangabuta/dump_images/master/LICENSE> */
(function() {
	'use strict';

	// Checks whether the URL is correct. And then, gets the character ID from it.
	var matches = window.location.href.match(/^https:\/\/hiroba\.dqx\.jp\/sc\/character\/([0-9]+)\/picture/);
	if (!matches) {
		alert('「冒険日誌」の「思い出アルバム」に移動してから、再度本ブックマークを実行してください。');
		return;
	}
	var baseUrl = matches[0] + '/page/';
	var charId = matches[1];

	var images = [];

	// Creates and displays own content box.
	$('#bookmarklet-dump-images').remove();
	$('#contentArea .cttBox .contentsFrameArea').prepend('<div id="bookmarklet-dump-images" style="margin-bottom: 20px; padding: 0px 32px 20px 20px;"></div>');
	$('#bookmarklet-dump-images').append('<div class="newsBox"><h2 class="tit_note tit_icon">DQXアルバム画像一括保存ブックマークレット</h2><h3 class="tit_compass"></h3></div>');

	// Creates function calls.
	var callbacks = [];
	var pageNum = 1 + parseInt($('a.pagerBottom').attr('href').replace(/^.*\/(\d+)\/*$/, '$1'), 10);
	for (var i = 0; i < pageNum; i++) {
		/* jshint loopfunc: true */
		callbacks.push((function(index) {
			return function() {
				var d = $.Deferred();
				setTimeout(function() {
					// Gets the playlog pages and analyzes them.
					$.get(baseUrl + index, function(data) {
						$.each($(data).find('#pictureList tr'), function() {
							var showLargePict = $(this).find('a.showLargePict');
							var m = showLargePict.attr('rel').match(/(\d+)\/picture\/detail\/(\d+)/);
							var imageUrl = (m && m.length == 3) ? 'https://img.dqx.jp/smpicture/download/webpicture/' + m[1] + '/original/' + m[2] + '/?dl' : '';
							var thumbnailUrl = (m && m.length == 3) ? 'https://img.dqx.jp/smpicture/download/webpicture/' + m[1] + '/thum2/' + m[2] + '/' : '';
							var comment = showLargePict.attr('title') || '';

							var dateAndLocation = $(this).find('p.thumbLocationAndDate').html().split('<br>');
							var date = dateAndLocation && dateAndLocation[0] || '';
							var location = dateAndLocation && dateAndLocation[1] || '';
							var fileName = date.replace(/(\/|:)/g, '').replace(' ', '-') + '_' + m[2] + '.jpg';

							images.push({
								imageUrl: imageUrl,
								thumbnailUrl: thumbnailUrl,
								fileName: fileName,
								date: date,
								location: location,<commit_msg>大きなサイズの画像のダウンロードに対応<commit_after>/** @licence <https://raw.githubusercontent.com/mangabuta/dump_images/master/LICENSE> */
(function() {
	'use strict';

	// Checks whether the URL is correct. And then, gets the character ID from it.
	var matches = window.location.href.match(/^https:\/\/hiroba\.dqx\.jp\/sc\/character\/([0-9]+)\/picture/);
	if (!matches) {
		alert('「冒険日誌」の「思い出アルバム」に移動してから、再度本ブックマークを実行してください。');
		return;
	}
	var baseUrl = matches[0] + '/page/';
	var charId = matches[1];

	var images = [];

	// Creates and displays own content box.
	$('#bookmarklet-dump-images').remove();
	$('#contentArea .cttBox .contentsFrameArea').prepend('<div id="bookmarklet-dump-images" style="margin-bottom: 20px; padding: 0px 32px 20px 20px;"></div>');
	$('#bookmarklet-dump-images').append('<div class="newsBox"><h2 class="tit_note tit_icon">DQXアルバム画像一括保存ブックマークレット</h2><h3 class="tit_compass"></h3></div>');

	// Creates function calls.
	var callbacks = [];
	var pageNum = 1 + parseInt($('a.pagerBottom').attr('href').replace(/^.*\/(\d+)\/*$/, '$1'), 10);
	for (var i = 0; i < pageNum; i++) {
		/* jshint loopfunc: true */
		callbacks.push((function(index) {
			return function() {
				var d = $.Deferred();
				setTimeout(function() {
					// Gets the playlog pages and analyzes them.
					$.get(baseUrl + index, function(data) {
						$.each($(data).find('#pictureList tr'), function() {
							var showLargePict = $(this).find('a.showLargePict');
							var m = showLargePict.attr('rel').match(/(\d+)\/picture\/detail\/(\d+)/);
							var imageUrl = (m && m.length == 3) ? 'https://img.dqx.jp/smpicture/download/webpicture/' + m[1] + '/xl/' + m[2] + '/?dl' : '';
							var thumbnailUrl = (m && m.length == 3) ? 'https://img.dqx.jp/smpicture/download/webpicture/' + m[1] + '/thum2/' + m[2] + '/' : '';
							var comment = showLargePict.attr('title') || '';

							var dateAndLocation = $(this).find('p.thumbLocationAndDate').html().split('<br>');
							var date = dateAndLocation && dateAndLocation[0] || '';
							var location = dateAndLocation && dateAndLocation[1] || '';
							var fileName = date.replace(/(\/|:)/g, '').replace(' ', '-') + '_' + m[2] + '.jpg';

							images.push({
								imageUrl: imageUrl,
								thumbnailUrl: thumbnailUrl,
								fileName: fileName,
								date: date,
								location: location,
{'fraction_non_alphanumeric': 0.21707421707421706, 'fraction_numerical': 0.013728013728013728, 'mean_word_length': 3.419905213270142, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 23, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2042530', 'n_tokens_mistral': 1977, 'n_tokens_neox': 1683, 'n_words': 311}