Plugin to show images or gifs from anchor elements on hover.

@return {Function}
505597
function plugin() {
  return function(files, metalsmith, done) {
    Object.keys(files).forEach(function(file) {
      if (!~file.indexOf('.html')) return;
      var $ = cheerio.load(files[file].contents);
      var links = $('a');
      for (var i = links.length - 1; i >= 0; i--) {
        var url = links[i].attribs.href;
        if (image(url)) $(links[i]).append(img(url));
      }
      $.root().prepend(css());
      files[file].contents = new Buffer($.html());
    });
    done();
  };
}
1029638
function PluginDocLink({ plugin, onClick }) {
	  if (!plugin) {
	    return null;
	  }

	  const href = `https://www.npmjs.com/package/${ plugin }`;
	  return React.createElement(
	    "a",
	    { className: "snapshot__helper", target: "_blank", href: href, onClick: onClick },
	    "?"
	  );
	}
1291324
function(){
			var plugin = $(this.element).data("ui-" + this.options.pluginName) || $(this.element).data(this.options.pluginName),
				opts = this.options,
				actualOpts = plugin.options,
				availOptList = opts.optionList,
				$opts = $(this.options.optionTarget).empty(),
				$ul = $("<ul>").appendTo($opts),
				$li = null;
			$.each(availOptList, function(i, o){
				if( typeof o.value === "boolean"){
					$li = $("<li>").append(
						$("<input>", {
							id: o.name,
							name: o.name,
							type: "checkbox",
							checked: !!actualOpts[o.name]  //o.value
						})
					).append(
						$("<label>", {"for": o.name, text: " " + o.hint})
					);
				}else if( typeof o.value === "number" || typeof o.value === "string"){
					$li = $("<li>").append(
							$("<label>", {"for": o.name, text: " " + o.name})
						).append(
							$("<input>", {
								id: o.name,
								name: o.name,
								type: "text",
								value: actualOpts[o.name] //o.value
							})
						);
				}else if( $.isArray(o.value) ){
					$li = $("<li>")
						.append(
							$("<label>", {"for": o.name, text: " " + o.name})
						).append(
							$("<select>", {
								id: o.name,
								name: o.name,
								size: 1
							})
						);
					var $sel = $li.find("select");
					$.each(o.value, function(){
						$sel.append($("<option>", {
							value: this.value,
							text: this.name,
							selected: (actualOpts[o.name] == this.value)  //this.selected
						}));
					});
				}
				$ul.append($li);
			});
		}
871566
function()
              {
                color.current.val('ahex', color.active.val('ahex'));
                var attachIFrame = function()
                  {
                    if (!settings.window.expandable || $.support.boxModel) return;
                    var table = container.find('table:first');
                    container.before('<iframe/>');
                    container.prev().css({ width: table.width(), height: container.height(), opacity: 0, position: 'absolute', left: container.css("left"), top: container.css("top") });
                  };
                if (settings.window.expandable)
                {
                  $(document.body).children('div.jPicker.Container').css({zIndex:10});
                  container.css({zIndex:20});
                }
                switch (settings.window.effects.type)
                {
                  case 'fade':
                    container.fadeIn(settings.window.effects.speed.show, attachIFrame);
                    break;
                  case 'slide':
                    container.slideDown(settings.window.effects.speed.show, attachIFrame);
                    break;
                  case 'show':
                  default:
                    container.show(settings.window.effects.speed.show, attachIFrame);
                    break;
                }
              }
787445
function (e) {
			var href;
			var $this = $(this);
			var $target = $($this.attr("data-target") || (href = $this.attr("href")) && href.replace(/.*(?=#[^\s]+$)/, "")); // strip for ie7
			if (!$target.hasClass("carousel")) return;
			var options = $.extend({}, $target.data(), $this.data());
			var slideIndex = $this.attr("data-slide-to");
			if (slideIndex) options.interval = false;

			Plugin.call($target, options);

			if (slideIndex) {
				$target.data("bs.carousel").to(slideIndex);
			}

			e.preventDefault();
		}
521155
function(){
			var plugin = $(this.element).data("ui-" + this.options.pluginName) || $(this.element).data(this.options.pluginName),
				opts = this.options,
				actualOpts = plugin.options,
				availOptList = opts.optionList,
				lines = [],
				header = opts.header || '$("#selector").' + opts.pluginName + "({",
				footer = "});",
				i;
			// Make a filtered copy of the option list (so we get the last ',' right)
			if(this.options.hideDefaults){
				availOptList = [];
				for(i=0; i<this.options.optionList.length; i++){
					var o = this.options.optionList[i],
						n = o.name,
						defVal = o.value;
					if($.isArray(defVal)){
						defVal = $.map(defVal, function(e){ return e.selected ? e.value : null;})[0];
					}
					if( actualOpts[n] !== defVal /*&& actualOpts[n] !== undefined*/){
						availOptList.push(o);
					}
				}
			}
			//
			lines.push(header);
			for(i=0; i<availOptList.length; i++){
				var o = availOptList[i],
					actualVal = actualOpts[o.name],
					line = "    " + o.name + ": ";
				if(typeof actualVal === "string"){
					line += '"' + actualVal + '"';
				}else if($.isPlainObject(actualVal)){
					line += JSON.stringify(actualVal);
				}else{
					line += "" + actualVal;
				}
				if( i < (availOptList.length - 1) ){
					line += ",";
				}
				if( opts.showComments ){
					line += " // " + o.hint;
				}
				lines.push(line);
			}
			lines.push(footer);
			$(opts.sourceTarget).addClass("ui-configurator-source").text(lines.join("\n"));
			this._trigger("render");
		}
185676
function ( item ) {  // function to obtain the URL of the thumbnail image
				var href;

				if (item.element) {
					href = $(item.element).find('img').attr('src');
				}

				if (!href && item.type === 'image' && item.href) {
					href = item.href;
				}

				return href;
			}
1059854
@Controller(events = EventType.MESSAGE, pattern = "(?i:list)")
    public void showList(Event event) {
        Element[] elements = new Element[]{
                new Element().setTitle("AnimateScroll").setSubtitle("A jQuery Plugin for Animating Scroll.")
                        .setImageUrl("https://plugins.compzets.com/images/as-logo.png")
                        .setDefaultAction(new Button().setType("web_url").setMessengerExtensions(true)
                        .setUrl("https://plugins.compzets.com/animatescroll/")),
                new Element().setTitle("Windows on Top").setSubtitle("Keeps a specific Window on Top of all others.")
                        .setImageUrl("https://plugins.compzets.com/images/compzets-logo.png")
                        .setDefaultAction(new Button().setType("web_url").setMessengerExtensions(true)
                        .setUrl("https://www.compzets.com/view-upload.php?id=702&action=view")),
                new Element().setTitle("SimpleFill").setSubtitle("Simplest form filler ever.")
                        .setImageUrl("https://plugins.compzets.com/simplefill/chrome-extension/icon-64.png")
                        .setDefaultAction(new Button().setType("web_url").setMessengerExtensions(true)
                        .setUrl("https://plugins.compzets.com/simplefill/"))
        };
        reply(event, new Message().setAttachment(new Attachment().setType("template").setPayload(new Payload()
                .setTemplateType("list").setElements(elements))));
    }
814328
function ()
    {
      // Append image label containers
      this.imageLabel = jQuery('<div/>', {'class': 'jBox-image-label-container'}).appendTo(this.wrapper);
      this.imageLabel.append(jQuery('<div/>', {'class': 'jBox-image-pointer-prev', click: function () { this.showImage('prev'); }.bind(this)})).append(jQuery('<div/>', {'class': 'jBox-image-pointer-next', click: function () { this.showImage('next'); }.bind(this)}));

      // Append the download button
      if (this.options.downloadButton) {
        this.downloadButton = jQuery('<div/>', {'class': 'jBox-image-download-button-wrapper'})
          .appendTo(this.wrapper)
          .append(
            this.options.downloadButtonText ? jQuery('<div/>', {'class': 'jBox-image-download-button-text'}).html(this.options.downloadButtonText) : null
          )
          .append(
            jQuery('<div/>', {'class': 'jBox-image-download-button-icon'})
          ).on('click touchdown', function () {
            if (this.images[this.currentImage.gallery][this.currentImage.id].downloadUrl) {
              var currentImageUrl = this.images[this.currentImage.gallery][this.currentImage.id].downloadUrl;
            } else {
              var currentImage = this.wrapper.find('.jBox-image-default-current');
              var currentImageStyle = currentImage[0].style.backgroundImage;
              var currentImageUrl = currentImageStyle.slice(4, -1).replace(/["']/g, '');
            }
            this.downloadImage(currentImageUrl);
          }.bind(this));
      }

      // Creating the image counter containers
      if (this.options.imageCounter) {
        this.imageCounter = jQuery('<div/>', {'class': 'jBox-image-counter-container'}).appendTo(this.wrapper);
        this.imageCounter.append(jQuery('<span/>', {'class': 'jBox-image-counter-current'})).append(jQuery('<span/>').html(this.options.imageCounterSeparator)).append(jQuery('<span/>', {'class': 'jBox-image-counter-all'}));
      }
    }
739712
function loadImage ($imageElement, newSource, callback) {
        $imageElement.fadeOut(function () {
            $imageElement.attr("src", newSource);
            imgLoad($imageElement, function () {
                $imageElement.removeClass("loading");
                $imageElement.fadeIn();
                if (typeof callback === "function") {
                    callback();
                }
            });
        });
    }
68737
function Plugin(option) {
			return this.each(function () {
				var $this = $(this);
				var data = $this.data("bs.carousel");
				var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == "object" && option);
				var action = typeof option == "string" ? option : options.slide;

				if (!data) $this.data("bs.carousel", (data = new Carousel(this, options)));
				if (typeof option == "number") data.to(option);
				else if (action) data[action]();
				else if (options.interval) data.pause().cycle();
			});
		}
172763
function onImagesLoaded(images, callback) {
    var self = this,
        unloaded = images.length;

    if (unloaded === 0) {
      callback();
    }

    images.each(function () {
      // Check if image is loaded
      if (this.complete || this.readyState === 4 || this.readyState === 'complete') {
        singleImageLoaded();
      }
      // Force load the image
      else {
          // fix for IE. See https://css-tricks.com/snippets/jquery/fixing-load-in-ie-for-cached-images/
          var src = $(this).attr('src');
          $(this).attr('src', src + (src.indexOf('?') >= 0 ? '&' : '?') + new Date().getTime());
          $(this).one('load', function () {
            singleImageLoaded();
          });
        }
    });

    function singleImageLoaded() {
      unloaded--;
      if (unloaded === 0) {
        callback();
      }
    }
  }
638557
function preloadImages( images, callback ) {

    function _preload( asset ) {
        asset.img = new Image();
        asset.img.src = 'img/' + asset.id+'.png';

        asset.img.addEventListener("load", function() {
            _check();
        }, false);

        asset.img.addEventListener("error", function(err) {
            _check(err, asset.id);
        }, false);
    }

    var loadc = 0;
    function _check( err, id ) {
        if ( err ) {
            alert('Failed to load ' + id );
        }
        loadc++;
        if ( images.length == loadc )
            return callback()
    }

    images.forEach(function(asset) {
        _preload( asset );
    });
}
699343
function() {

      var id, cssClass, src, target, link, alt, title;

      // populate link values
      if (hashedit.current.node !== null) {

        // get  attributes
        id = hashedit.current.node.getAttribute('id') || '';
        cssClass = hashedit.current.node.getAttribute('class') || '';
        src = hashedit.current.node.getAttribute('src') || '';
        alt = hashedit.current.node.getAttribute('alt') || '';
        title = hashedit.current.node.getAttribute('title') || '';


        // show the link dialog
        link = document.querySelector('#hashedit-image-settings-modal');
        link.setAttribute('visible', '');

        // sets start values
        document.getElementById('hashedit-image-id').value = id;
        document.getElementById('hashedit-image-cssclass').value = cssClass;
        document.getElementById('hashedit-image-src').value = src;
        document.getElementById('hashedit-image-alt').value = alt;
        document.getElementById('hashedit-image-title').value = title;

      }

    }
784019
function( button ) {
            var $element = $('<a/>').addClass( 'wysiwyg-toolbar-icon' )
                                    .prop('href','#')
                                    .prop('unselectable','on')
                                    .append(button.image);
            // pass other properties as "prop()"
            $.each( button, function( name, value )
            {
                switch( name )
                {
                    // classes
                    case 'class':
                        $element.addClass( value );
                        break;
                    // special meaning
                    case 'image':
                    case 'html':
                    case 'popup':
                    case 'click':
                    case 'showstatic':
                    case 'showselection':
                        break;
                    default: // button.title, ...
                        $element.attr( name, value );
                        break;
                }
            });
            return $element;
        }
1197872
function show(content, event){
      switch(arguments.length){
        case 1:
          // if there is only one argument, assume that it is event
          // just update the position and do not update content
          dom.style.display = 'block';
          updatePosition(arguments[0]);
          break;
        case 2:
          if(content){
            $tooltip.html(content);
          }
          dom.style.display = 'block';
          updatePosition(event);
          break;
      }
    }
552081
function Plugin(options) {
    return this.each(function () {
      var $navigation;
      var $this = $(this);
      var data = $this.data('bui.sortableTable');

      if (!data) {
        $navigation = options && 'navigation' in options && options.navigation ?
            $(options.navigation) : false;
        data = new SortableTable($this, $navigation);
        $this.data('bui.sortableTable', data);
      }

      data.sort(options['sorted-th'], options['sort-direction']);
    });
  }