var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; };
if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } }
{
  let window = _____WB$wombat$assign$function_____("window");
  let self = _____WB$wombat$assign$function_____("self");
  let document = _____WB$wombat$assign$function_____("document");
  let location = _____WB$wombat$assign$function_____("location");
  let top = _____WB$wombat$assign$function_____("top");
  let parent = _____WB$wombat$assign$function_____("parent");
  let frames = _____WB$wombat$assign$function_____("frames");
  let opener = _____WB$wombat$assign$function_____("opener");

/*
 * download-original.js
 * https://github.com/savetheinternet/Tinyboard/blob/master/js/download-original.js
 *
 * Makes image filenames clickable, allowing users to download and save files as their original filename.
 * Only works in newer browsers. http://caniuse.com/#feat=download
 *
 * Released under the MIT license
 * Copyright (c) 2012-2013 Michael Save <savetheinternet@tinyboard.org>
 * Copyright (c) 2013-2014 Marcin Łabanowski <marcin@6irc.net>
 *
 * Usage:
 *   $config['additional_javascript'][] = 'js/jquery.min.js';
 *   $config['additional_javascript'][] = 'js/download-original.js';
 *
 */

onready(function(){
	var do_original_filename = function() {
		var filename, truncated;
		if ($(this).attr('title')) {
			filename = $(this).attr('title');
			truncated = true;
		} else {
			filename = $(this).text();
		}
		
		$(this).replaceWith(
			$('<a></a>')
				.attr('download', filename)
				.append($(this).contents())
				.attr('href', $(this).parent().parent().find('a').attr('href'))
				.attr('title', _('Save as original filename') + (truncated ? ' (' + filename + ')' : ''))
			);
	};

	$('.postfilename').each(do_original_filename);

        $(document).on('new_post', function(e, post) {
		$(post).find('.postfilename').each(do_original_filename);
	});
});


}
/*
     FILE ARCHIVED ON 10:14:48 Apr 28, 2024 AND RETRIEVED FROM THE
     INTERNET ARCHIVE ON 12:39:35 May 10, 2024.
     JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.

     ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
     SECTION 108(a)(3)).
*/
/*
playback timings (ms):
  captures_list: 0.968
  exclusion.robots: 0.11
  exclusion.robots.policy: 0.094
  esindex: 0.017
  cdx.remote: 4.557
  LoadShardBlock: 76.436 (3)
  PetaboxLoader3.resolve: 95.273 (3)
  PetaboxLoader3.datanode: 127.745 (5)
  load_resource: 188.656 (2)
*/