{"action":"created","comment":{"url":"https://api.github.com/repos/sul-dlss/sul-embed/pulls/comments/34794926","id":34794926,"diff_hunk":"@@ -0,0 +1,2174 @@\n+/*!\n+ * sly 1.5.1 - 28th Apr 2015\n+ * https://github.com/darsain/sly\n+ *\n+ * Licensed under the MIT license.\n+ * http://opensource.org/licenses/MIT\n+ */\n+;(function ($, w, undefined) {\n+\t'use strict';\n+\n+\tvar pluginName = 'sly';\n+\tvar className  = 'Sly';\n+\tvar namespace  = pluginName;\n+\n+\t// Local WindowAnimationTiming interface\n+\tvar cAF = w.cancelAnimationFrame || w.cancelRequestAnimationFrame;\n+\tvar rAF = w.requestAnimationFrame;\n+\n+\t// Support indicators\n+\tvar transform, gpuAcceleration;\n+\n+\t// Other global values\n+\tvar $doc = $(document);\n+\tvar dragInitEvents = 'touchstart.' + namespace + ' mousedown.' + namespace;\n+\tvar dragMouseEvents = 'mousemove.' + namespace + ' mouseup.' + namespace;\n+\tvar dragTouchEvents = 'touchmove.' + namespace + ' touchend.' + namespace;\n+\tvar wheelEvent = (document.implementation.hasFeature('Event.wheel', '3.0') ? 'wheel.' : 'mousewheel.') + namespace;\n+\tvar clickEvent = 'click.' + namespace;\n+\tvar mouseDownEvent = 'mousedown.' + namespace;\n+\tvar interactiveElements = ['INPUT', 'SELECT', 'BUTTON', 'TEXTAREA'];\n+\tvar tmpArray = [];\n+\tvar time;\n+\n+\t// Math shorthands\n+\tvar abs = Math.abs;\n+\tvar sqrt = Math.sqrt;\n+\tvar pow = Math.pow;\n+\tvar round = Math.round;\n+\tvar max = Math.max;\n+\tvar min = Math.min;\n+\n+\t// Keep track of last fired global wheel event\n+\tvar lastGlobalWheel = 0;\n+\t$doc.on(wheelEvent, function (event) {\n+\t\tvar sly = event.originalEvent[namespace];\n+\t\tvar time = +new Date();\n+\t\t// Update last global wheel time, but only when event didn't originate\n+\t\t// in Sly frame, or the origin was less than scrollHijack time ago\n+\t\tif (!sly || sly.options.scrollHijack < time - lastGlobalWheel) lastGlobalWheel = time;\n+\t});\n+\n+\t/**\n+\t * Sly.\n+\t *\n+\t * @class\n+\t *\n+\t * @param {Element} frame       DOM element of sly container.\n+\t * @param {Object}  options     Object with options.\n+\t * @param {Object}  callbackMap Callbacks map.\n+\t */\n+\tfunction Sly(frame, options, callbackMap) {\n+\t\t// Extend options\n+\t\tvar o = $.extend({}, Sly.defaults, options);\n+\n+\t\t// Private variables\n+\t\tvar self = this;\n+\t\tvar parallax = isNumber(frame);\n+\n+\t\t// Frame\n+\t\tvar $frame = $(frame);\n+\t\tvar $slidee = o.slidee ? $(o.slidee).eq(0) : $frame.children().eq(0);\n+\t\tvar frameSize = 0;\n+\t\tvar slideeSize = 0;\n+\t\tvar pos = {\n+\t\t\tstart: 0,\n+\t\t\tcenter: 0,\n+\t\t\tend: 0,\n+\t\t\tcur: 0,\n+\t\t\tdest: 0\n+\t\t};\n+\n+\t\t// Scrollbar\n+\t\tvar $sb = $(o.scrollBar).eq(0);\n+\t\tvar $handle = $sb.children().eq(0);\n+\t\tvar sbSize = 0;\n+\t\tvar handleSize = 0;\n+\t\tvar hPos = {\n+\t\t\tstart: 0,\n+\t\t\tend: 0,\n+\t\t\tcur: 0\n+\t\t};\n+\n+\t\t// Pagesbar\n+\t\tvar $pb = $(o.pagesBar);\n+\t\tvar $pages = 0;\n+\t\tvar pages = [];\n+\n+\t\t// Items\n+\t\tvar $items = 0;\n+\t\tvar items = [];\n+\t\tvar rel = {\n+\t\t\tfirstItem: 0,\n+\t\t\tlastItem: 0,\n+\t\t\tcenterItem: 0,\n+\t\t\tactiveItem: null,\n+\t\t\tactivePage: 0\n+\t\t};\n+\n+\t\t// Styles\n+\t\tvar frameStyles = new StyleRestorer($frame[0]);\n+\t\tvar slideeStyles = new StyleRestorer($slidee[0]);\n+\t\tvar sbStyles = new StyleRestorer($sb[0]);\n+\t\tvar handleStyles = new StyleRestorer($handle[0]);\n+\n+\t\t// Navigation type booleans\n+\t\tvar basicNav = o.itemNav === 'basic';\n+\t\tvar forceCenteredNav = o.itemNav === 'forceCentered';\n+\t\tvar centeredNav = o.itemNav === 'centered' || forceCenteredNav;\n+\t\tvar itemNav = !parallax && (basicNav || centeredNav || forceCenteredNav);\n+\n+\t\t// Miscellaneous\n+\t\tvar $scrollSource = o.scrollSource ? $(o.scrollSource) : $frame;\n+\t\tvar $dragSource = o.dragSource ? $(o.dragSource) : $frame;\n+\t\tvar $forwardButton = $(o.forward);\n+\t\tvar $backwardButton = $(o.backward);\n+\t\tvar $prevButton = $(o.prev);\n+\t\tvar $nextButton = $(o.next);\n+\t\tvar $prevPageButton = $(o.prevPage);\n+\t\tvar $nextPageButton = $(o.nextPage);\n+\t\tvar callbacks = {};\n+\t\tvar last = {};\n+\t\tvar animation = {};\n+\t\tvar move = {};\n+\t\tvar dragging = {\n+\t\t\treleased: 1\n+\t\t};\n+\t\tvar scrolling = {\n+\t\t\tlast: 0,\n+\t\t\tdelta: 0,\n+\t\t\tresetTime: 200\n+\t\t};\n+\t\tvar renderID = 0;\n+\t\tvar historyID = 0;\n+\t\tvar cycleID = 0;\n+\t\tvar continuousID = 0;\n+\t\tvar i, l;\n+\n+\t\t// Normalizing frame\n+\t\tif (!parallax) {\n+\t\t\tframe = $frame[0];\n+\t\t}\n+\n+\t\t// Expose properties\n+\t\tself.initialized = 0;\n+\t\tself.frame = frame;\n+\t\tself.slidee = $slidee[0];\n+\t\tself.pos = pos;\n+\t\tself.rel = rel;\n+\t\tself.items = items;\n+\t\tself.pages = pages;\n+\t\tself.isPaused = 0;\n+\t\tself.options = o;\n+\t\tself.dragging = dragging;\n+\n+\t\t/**\n+\t\t * Loading function.\n+\t\t *\n+\t\t * Populate arrays, set sizes, bind events, ...\n+\t\t *\n+\t\t * @param {Boolean} [isInit] Whether load is called from within self.init().\n+\t\t * @return {Void}\n+\t\t */\n+\t\tfunction load(isInit) {\n+\t\t\t// Local variables\n+\t\t\tvar lastItemsCount = 0;\n+\t\t\tvar lastPagesCount = pages.length;\n+\n+\t\t\t// Save old position\n+\t\t\tpos.old = $.extend({}, pos);\n+\n+\t\t\t// Reset global variables\n+\t\t\tframeSize = parallax ? 0 : $frame[o.horizontal ? 'width' : 'height']();\n+\t\t\tsbSize = $sb[o.horizontal ? 'width' : 'height']();\n+\t\t\tslideeSize = parallax ? frame : $slidee[o.horizontal ? 'outerWidth' : 'outerHeight']();\n+\t\t\tpages.length = 0;\n+\n+\t\t\t// Set position limits & relatives\n+\t\t\tpos.start = 0;\n+\t\t\tpos.end = max(slideeSize - frameSize, 0);\n+\n+\t\t\t// Sizes & offsets for item based navigations\n+\t\t\tif (itemNav) {\n+\t\t\t\t// Save the number of current items\n+\t\t\t\tlastItemsCount = items.length;\n+\n+\t\t\t\t// Reset itemNav related variables\n+\t\t\t\t$items = $slidee.children(o.itemSelector);\n+\t\t\t\titems.length = 0;\n+\n+\t\t\t\t// Needed variables\n+\t\t\t\tvar paddingStart = getPx($slidee, o.horizontal ? 'paddingLeft' : 'paddingTop');\n+\t\t\t\tvar paddingEnd = getPx($slidee, o.horizontal ? 'paddingRight' : 'paddingBottom');\n+\t\t\t\tvar borderBox = $($items).css('boxSizing') === 'border-box';\n+\t\t\t\tvar areFloated = $items.css('float') !== 'none';\n+\t\t\t\tvar ignoredMargin = 0;\n+\t\t\t\tvar lastItemIndex = $items.length - 1;\n+\t\t\t\tvar lastItem;\n+\n+\t\t\t\t// Reset slideeSize\n+\t\t\t\tslideeSize = 0;\n+\n+\t\t\t\t// Iterate through items\n+\t\t\t\t$items.each(function (i, element) {\n+\t\t\t\t\t// Item\n+\t\t\t\t\tvar $item = $(element);\n+\t\t\t\t\tvar rect = element.getBoundingClientRect();\n+\t\t\t\t\tvar itemSize = round(o.horizontal ? rect.width || rect.right - rect.left : rect.height || rect.bottom - rect.top);\n+\t\t\t\t\tvar itemMarginStart = getPx($item, o.horizontal ? 'marginLeft' : 'marginTop');\n+\t\t\t\t\tvar itemMarginEnd = getPx($item, o.horizontal ? 'marginRight' : 'marginBottom');\n+\t\t\t\t\tvar itemSizeFull = itemSize + itemMarginStart + itemMarginEnd;\n+\t\t\t\t\tvar singleSpaced = !itemMarginStart || !itemMarginEnd;\n+\t\t\t\t\tvar item = {};\n+\t\t\t\t\titem.el = element;\n+\t\t\t\t\titem.size = singleSpaced ? itemSize : itemSizeFull;\n+\t\t\t\t\titem.half = item.size / 2;\n+\t\t\t\t\titem.start = slideeSize + (singleSpaced ? itemMarginStart : 0);\n+\t\t\t\t\titem.center = item.start - round(frameSize / 2 - item.size / 2);\n+\t\t\t\t\titem.end = item.start - frameSize + item.size;\n+\n+\t\t\t\t\t// Account for slidee padding\n+\t\t\t\t\tif (!i) {\n+\t\t\t\t\t\tslideeSize += paddingStart;\n+\t\t\t\t\t}\n+\n+\t\t\t\t\t// Increment slidee size for size of the active element\n+\t\t\t\t\tslideeSize += itemSizeFull;\n+\n+\t\t\t\t\t// Try to account for vertical margin collapsing in vertical mode\n+\t\t\t\t\t// It's not bulletproof, but should work in 99% of cases\n+\t\t\t\t\tif (!o.horizontal && !areFloated) {\n+\t\t\t\t\t\t// Subtract smaller margin, but only when top margin is not 0, and this is not the first element\n+\t\t\t\t\t\tif (itemMarginEnd && itemMarginStart && i > 0) {\n+\t\t\t\t\t\t\tslideeSize -= min(itemMarginStart, itemMarginEnd);\n+\t\t\t\t\t\t}\n+\t\t\t\t\t}\n+\n+\t\t\t\t\t// Things to be done on last item\n+\t\t\t\t\tif (i === lastItemIndex) {\n+\t\t\t\t\t\titem.end += paddingEnd;\n+\t\t\t\t\t\tslideeSize += paddingEnd;\n+\t\t\t\t\t\tignoredMargin = singleSpaced ? itemMarginEnd : 0;\n+\t\t\t\t\t}\n+\n+\t\t\t\t\t// Add item object to items array\n+\t\t\t\t\titems.push(item);\n+\t\t\t\t\tlastItem = item;\n+\t\t\t\t});\n+\n+\t\t\t\t// Resize SLIDEE to fit all items\n+\t\t\t\t$slidee[0].style[o.horizontal ? 'width' : 'height'] = (borderBox ? slideeSize: slideeSize - paddingStart - paddingEnd) + 'px';\n+\n+\t\t\t\t// Adjust internal SLIDEE size for last margin\n+\t\t\t\tslideeSize -= ignoredMargin;\n+\n+\t\t\t\t// Set limits\n+\t\t\t\tif (items.length) {\n+\t\t\t\t\tpos.start =  items[0][forceCenteredNav ? 'center' : 'start'];\n+\t\t\t\t\tpos.end = forceCenteredNav ? lastItem.center : frameSize < slideeSize ? lastItem.end : pos.start;\n+\t\t\t\t} else {\n+\t\t\t\t\tpos.start = pos.end = 0;\n+\t\t\t\t}\n+\t\t\t}\n+\n+\t\t\t// Calculate SLIDEE center position\n+\t\t\tpos.center = round(pos.end / 2 + pos.start / 2);\n+\n+\t\t\t// Update relative positions\n+\t\t\tupdateRelatives();\n+\n+\t\t\t// Scrollbar\n+\t\t\tif ($handle.length && sbSize > 0) {\n+\t\t\t\t// Stretch scrollbar handle to represent the visible area\n+\t\t\t\tif (o.dynamicHandle) {\n+\t\t\t\t\thandleSize = pos.start === pos.end ? sbSize : round(sbSize * frameSize / slideeSize);\n+\t\t\t\t\thandleSize = within(handleSize, o.minHandleSize, sbSize);\n+\t\t\t\t\t$handle[0].style[o.horizontal ? 'width' : 'height'] = handleSize + 'px';\n+\t\t\t\t} else {\n+\t\t\t\t\thandleSize = $handle[o.horizontal ? 'outerWidth' : 'outerHeight']();\n+\t\t\t\t}\n+\n+\t\t\t\thPos.end = sbSize - handleSize;\n+\n+\t\t\t\tif (!renderID) {\n+\t\t\t\t\tsyncScrollbar();\n+\t\t\t\t}\n+\t\t\t}\n+\n+\t\t\t// Pages\n+\t\t\tif (!parallax && frameSize > 0) {\n+\t\t\t\tvar tempPagePos = pos.start;\n+\t\t\t\tvar pagesHtml = '';\n+\n+\t\t\t\t// Populate pages array\n+\t\t\t\tif (itemNav) {\n+\t\t\t\t\t$.each(items, function (i, item) {\n+\t\t\t\t\t\tif (forceCenteredNav) {\n+\t\t\t\t\t\t\tpages.push(item.center);\n+\t\t\t\t\t\t} else if (item.start + item.size > tempPagePos && tempPagePos <= pos.end) {\n+\t\t\t\t\t\t\ttempPagePos = item.start;\n+\t\t\t\t\t\t\tpages.push(tempPagePos);\n+\t\t\t\t\t\t\ttempPagePos += frameSize;\n+\t\t\t\t\t\t\tif (tempPagePos > pos.end && tempPagePos < pos.end + frameSize) {\n+\t\t\t\t\t\t\t\tpages.push(pos.end);\n+\t\t\t\t\t\t\t}\n+\t\t\t\t\t\t}\n+\t\t\t\t\t});\n+\t\t\t\t} else {\n+\t\t\t\t\twhile (tempPagePos - frameSize < pos.end) {\n+\t\t\t\t\t\tpages.push(tempPagePos);\n+\t\t\t\t\t\ttempPagePos += frameSize;\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\n+\t\t\t\t// Pages bar\n+\t\t\t\tif ($pb[0] && lastPagesCount !== pages.length) {\n+\t\t\t\t\tfor (var i = 0; i < pages.length; i++) {\n+\t\t\t\t\t\tpagesHtml += o.pageBuilder.call(self, i);\n+\t\t\t\t\t}\n+\t\t\t\t\t$pages = $pb.html(pagesHtml).children();\n+\t\t\t\t\t$pages.eq(rel.activePage).addClass(o.activeClass);\n+\t\t\t\t}\n+\t\t\t}\n+\n+\t\t\t// Extend relative variables object with some useful info\n+\t\t\trel.slideeSize = slideeSize;\n+\t\t\trel.frameSize = frameSize;\n+\t\t\trel.sbSize = sbSize;\n+\t\t\trel.handleSize = handleSize;\n+\n+\t\t\t// Activate requested position\n+\t\t\tif (itemNav) {\n+\t\t\t\tif (isInit && o.startAt != null) {\n+\t\t\t\t\tactivate(o.startAt);\n+\t\t\t\t\tself[centeredNav ? 'toCenter' : 'toStart'](o.startAt);\n+\t\t\t\t}\n+\t\t\t\t// Fix possible overflowing\n+\t\t\t\tvar activeItem = items[rel.activeItem];\n+\t\t\t\tslideTo(centeredNav && activeItem ? activeItem.center : within(pos.dest, pos.start, pos.end));\n+\t\t\t} else {\n+\t\t\t\tif (isInit) {\n+\t\t\t\t\tif (o.startAt != null) slideTo(o.startAt, 1);\n+\t\t\t\t} else {\n+\t\t\t\t\t// Fix possible overflowing\n+\t\t\t\t\tslideTo(within(pos.dest, pos.start, pos.end));\n+\t\t\t\t}\n+\t\t\t}\n+\n+\t\t\t// Trigger load event\n+\t\t\ttrigger('load');\n+\t\t}\n+\t\tself.reload = function () { load(); };\n+\n+\t\t/**\n+\t\t * Animate to a position.\n+\t\t *\n+\t\t * @param {Int}  newPos    New position.\n+\t\t * @param {Bool} immediate Reposition immediately without an animation.\n+\t\t * @param {Bool} dontAlign Do not align items, use the raw position passed in first argument.\n+\t\t *\n+\t\t * @return {Void}\n+\t\t */\n+\t\tfunction slideTo(newPos, immediate, dontAlign) {\n+\t\t\t// Align items\n+\t\t\tif (itemNav && dragging.released && !dontAlign) {\n+\t\t\t\tvar tempRel = getRelatives(newPos);\n+\t\t\t\tvar isNotBordering = newPos > pos.start && newPos < pos.end;\n+\n+\t\t\t\tif (centeredNav) {\n+\t\t\t\t\tif (isNotBordering) {\n+\t\t\t\t\t\tnewPos = items[tempRel.centerItem].center;\n+\t\t\t\t\t}\n+\t\t\t\t\tif (forceCenteredNav && o.activateMiddle) {\n+\t\t\t\t\t\tactivate(tempRel.centerItem);\n+\t\t\t\t\t}\n+\t\t\t\t} else if (isNotBordering) {\n+\t\t\t\t\tnewPos = items[tempRel.firstItem].start;\n+\t\t\t\t}\n+\t\t\t}\n+\n+\t\t\t// Handle overflowing position limits\n+\t\t\tif (dragging.init && dragging.slidee && o.elasticBounds) {\n+\t\t\t\tif (newPos > pos.end) {\n+\t\t\t\t\tnewPos = pos.end + (newPos - pos.end) / 6;\n+\t\t\t\t} else if (newPos < pos.start) {\n+\t\t\t\t\tnewPos = pos.start + (newPos - pos.start) / 6;\n+\t\t\t\t}\n+\t\t\t} else {\n+\t\t\t\tnewPos = within(newPos, pos.start, pos.end);\n+\t\t\t}\n+\n+\t\t\t// Update the animation object\n+\t\t\tanimation.start = +new Date();\n+\t\t\tanimation.time = 0;\n+\t\t\tanimation.from = pos.cur;\n+\t\t\tanimation.to = newPos;\n+\t\t\tanimation.delta = newPos - pos.cur;\n+\t\t\tanimation.tweesing = dragging.tweese || dragging.init && !dragging.slidee;\n+\t\t\tanimation.immediate = !animation.tweesing && (immediate || dragging.init && dragging.slidee || !o.speed);\n+\n+\t\t\t// Reset dragging tweesing request\n+\t\t\tdragging.tweese = 0;\n+\n+\t\t\t// Start animation rendering\n+\t\t\tif (newPos !== pos.dest) {\n+\t\t\t\tpos.dest = newPos;\n+\t\t\t\ttrigger('change');\n+\t\t\t\tif (!renderID) {\n+\t\t\t\t\trender();\n+\t\t\t\t}\n+\t\t\t}\n+\n+\t\t\t// Reset next cycle timeout\n+\t\t\tresetCycle();\n+\n+\t\t\t// Synchronize states\n+\t\t\tupdateRelatives();\n+\t\t\tupdateButtonsState();\n+\t\t\tsyncPagesbar();\n+\t\t}\n+\n+\t\t/**\n+\t\t * Render animation frame.\n+\t\t *\n+\t\t * @return {Void}\n+\t\t */\n+\t\tfunction render() {\n+\t\t\tif (!self.initialized) {\n+\t\t\t\treturn;\n+\t\t\t}\n+\n+\t\t\t// If first render call, wait for next animationFrame\n+\t\t\tif (!renderID) {\n+\t\t\t\trenderID = rAF(render);\n+\t\t\t\tif (dragging.released) {\n+\t\t\t\t\ttrigger('moveStart');\n+\t\t\t\t}\n+\t\t\t\treturn;\n+\t\t\t}\n+\n+\t\t\t// If immediate repositioning is requested, don't animate.\n+\t\t\tif (animation.immediate) {\n+\t\t\t\tpos.cur = animation.to;\n+\t\t\t}\n+\t\t\t// Use tweesing for animations without known end point\n+\t\t\telse if (animation.tweesing) {\n+\t\t\t\tanimation.tweeseDelta = animation.to - pos.cur;\n+\t\t\t\t// Fuck Zeno's paradox\n+\t\t\t\tif (abs(animation.tweeseDelta) < 0.1) {\n+\t\t\t\t\tpos.cur = animation.to;\n+\t\t\t\t} else {\n+\t\t\t\t\tpos.cur += animation.tweeseDelta * (dragging.released ? o.swingSpeed : o.syncSpeed);\n+\t\t\t\t}\n+\t\t\t}\n+\t\t\t// Use tweening for basic animations with known end point\n+\t\t\telse {\n+\t\t\t\tanimation.time = min(+new Date() - animation.start, o.speed);\n+\t\t\t\tpos.cur = animation.from + animation.delta * $.easing[o.easing](animation.time/o.speed, animation.time, 0, 1, o.speed);\n+\t\t\t}\n+\n+\t\t\t// If there is nothing more to render break the rendering loop, otherwise request new animation frame.\n+\t\t\tif (animation.to === pos.cur) {\n+\t\t\t\tpos.cur = animation.to;\n+\t\t\t\tdragging.tweese = renderID = 0;\n+\t\t\t} else {\n+\t\t\t\trenderID = rAF(render);\n+\t\t\t}\n+\n+\t\t\ttrigger('move');\n+\n+\t\t\t// Update SLIDEE position\n+\t\t\tif (!parallax) {\n+\t\t\t\tif (transform) {\n+\t\t\t\t\t$slidee[0].style[transform] = gpuAcceleration + (o.horizontal ? 'translateX' : 'translateY') + '(' + (-pos.cur) + 'px)';\n+\t\t\t\t} else {\n+\t\t\t\t\t$slidee[0].style[o.horizontal ? 'left' : 'top'] = -round(pos.cur) + 'px';\n+\t\t\t\t}\n+\t\t\t}\n+\n+\t\t\t// When animation reached the end, and dragging is not active, trigger moveEnd\n+\t\t\tif (!renderID && dragging.released) {\n+\t\t\t\ttrigger('moveEnd');\n+\t\t\t}\n+\n+\t\t\tsyncScrollbar();\n+\t\t}\n+\n+\t\t/**\n+\t\t * Synchronizes scrollbar with the SLIDEE.\n+\t\t *\n+\t\t * @return {Void}\n+\t\t */\n+\t\tfunction syncScrollbar() {\n+\t\t\tif ($handle.length) {\n+\t\t\t\thPos.cur = pos.start === pos.end ? 0 : (((dragging.init && !dragging.slidee) ? pos.dest : pos.cur) - pos.start) / (pos.end - pos.start) * hPos.end;\n+\t\t\t\thPos.cur = within(round(hPos.cur), hPos.start, hPos.end);\n+\t\t\t\tif (last.hPos !== hPos.cur) {\n+\t\t\t\t\tlast.hPos = hPos.cur;\n+\t\t\t\t\tif (transform) {\n+\t\t\t\t\t\t$handle[0].style[transform] = gpuAcceleration + (o.horizontal ? 'translateX' : 'translateY') + '(' + hPos.cur + 'px)';\n+\t\t\t\t\t} else {\n+\t\t\t\t\t\t$handle[0].style[o.horizontal ? 'left' : 'top'] = hPos.cur + 'px';\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\t\t\t}\n+\t\t}\n+\n+\t\t/**\n+\t\t * Synchronizes pagesbar with SLIDEE.\n+\t\t *\n+\t\t * @return {Void}\n+\t\t */\n+\t\tfunction syncPagesbar() {\n+\t\t\tif ($pages[0] && last.page !== rel.activePage) {\n+\t\t\t\tlast.page = rel.activePage;\n+\t\t\t\t$pages.removeClass(o.activeClass).eq(rel.activePage).addClass(o.activeClass);\n+\t\t\t\ttrigger('activePage', last.page);\n+\t\t\t}\n+\t\t}\n+\n+\t\t/**\n+\t\t * Returns the position object.\n+\t\t *\n+\t\t * @param {Mixed} item\n+\t\t *\n+\t\t * @return {Object}\n+\t\t */\n+\t\tself.getPos = function (item) {\n+\t\t\tif (itemNav) {\n+\t\t\t\tvar index = getIndex(item);\n+\t\t\t\treturn index !== -1 ? items[index] : false;\n+\t\t\t} else {\n+\t\t\t\tvar $item = $slidee.find(item).eq(0);\n+\n+\t\t\t\tif ($item[0]) {\n+\t\t\t\t\tvar offset = o.horizontal ? $item.offset().left - $slidee.offset().left : $item.offset().top - $slidee.offset().top;\n+\t\t\t\t\tvar size = $item[o.horizontal ? 'outerWidth' : 'outerHeight']();\n+\n+\t\t\t\t\treturn {\n+\t\t\t\t\t\tstart: offset,\n+\t\t\t\t\t\tcenter: offset - frameSize / 2 + size / 2,\n+\t\t\t\t\t\tend: offset - frameSize + size,\n+\t\t\t\t\t\tsize: size\n+\t\t\t\t\t};\n+\t\t\t\t} else {\n+\t\t\t\t\treturn false;\n+\t\t\t\t}\n+\t\t\t}\n+\t\t};\n+\n+\t\t/**\n+\t\t * Continuous move in a specified direction.\n+\t\t *\n+\t\t * @param  {Bool} forward True for forward movement, otherwise it'll go backwards.\n+\t\t * @param  {Int}  speed   Movement speed in pixels per frame. Overrides options.moveBy value.\n+\t\t *\n+\t\t * @return {Void}\n+\t\t */\n+\t\tself.moveBy = function (speed) {\n+\t\t\tmove.speed = speed;\n+\t\t\t// If already initiated, or there is nowhere to move, abort\n+\t\t\tif (dragging.init || !move.speed || pos.cur === (move.speed > 0 ? pos.end : pos.start)) {\n+\t\t\t\treturn;\n+\t\t\t}\n+\t\t\t// Initiate move object\n+\t\t\tmove.lastTime = +new Date();\n+\t\t\tmove.startPos = pos.cur;\n+\t\t\t// Set dragging as initiated\n+\t\t\tcontinuousInit('button');\n+\t\t\tdragging.init = 1;\n+\t\t\t// Start movement\n+\t\t\ttrigger('moveStart');\n+\t\t\tcAF(continuousID);\n+\t\t\tmoveLoop();\n+\t\t};\n+\n+\t\t/**\n+\t\t * Continuous movement loop.\n+\t\t *\n+\t\t * @return {Void}\n+\t\t */\n+\t\tfunction moveLoop() {\n+\t\t\t// If there is nowhere to move anymore, stop\n+\t\t\tif (!move.speed || pos.cur === (move.speed > 0 ? pos.end : pos.start)) {\n+\t\t\t\tself.stop();\n+\t\t\t}\n+\t\t\t// Request new move loop if it hasn't been stopped\n+\t\t\tcontinuousID = dragging.init ? rAF(moveLoop) : 0;\n+\t\t\t// Update move object\n+\t\t\tmove.now = +new Date();\n+\t\t\tmove.pos = pos.cur + (move.now - move.lastTime) / 1000 * move.speed;\n+\t\t\t// Slide\n+\t\t\tslideTo(dragging.init ? move.pos : round(move.pos));\n+\t\t\t// Normally, this is triggered in render(), but if there\n+\t\t\t// is nothing to render, we have to do it manually here.\n+\t\t\tif (!dragging.init && pos.cur === pos.dest) {\n+\t\t\t\ttrigger('moveEnd');\n+\t\t\t}\n+\t\t\t// Update times for future iteration\n+\t\t\tmove.lastTime = move.now;\n+\t\t}\n+\n+\t\t/**\n+\t\t * Stops continuous movement.\n+\t\t *\n+\t\t * @return {Void}\n+\t\t */\n+\t\tself.stop = function () {\n+\t\t\tif (dragging.source === 'button') {\n+\t\t\t\tdragging.init = 0;\n+\t\t\t\tdragging.released = 1;\n+\t\t\t}\n+\t\t};\n+\n+\t\t/**\n+\t\t * Activate previous item.\n+\t\t *\n+\t\t * @return {Void}\n+\t\t */\n+\t\tself.prev = function () {\n+\t\t\tself.activate(rel.activeItem == null ? 0 : rel.activeItem - 1);\n+\t\t};\n+\n+\t\t/**\n+\t\t * Activate next item.\n+\t\t *\n+\t\t * @return {Void}\n+\t\t */\n+\t\tself.next = function () {\n+\t\t\tself.activate(rel.activeItem == null ? 0 : rel.activeItem + 1);\n+\t\t};\n+\n+\t\t/**\n+\t\t * Activate previous page.\n+\t\t *\n+\t\t * @return {Void}\n+\t\t */\n+\t\tself.prevPage = function () {\n+\t\t\tself.activatePage(rel.activePage - 1);\n+\t\t};\n+\n+\t\t/**\n+\t\t * Activate next page.\n+\t\t *\n+\t\t * @return {Void}\n+\t\t */\n+\t\tself.nextPage = function () {\n+\t\t\tself.activatePage(rel.activePage + 1);\n+\t\t};\n+\n+\t\t/**\n+\t\t * Slide SLIDEE by amount of pixels.\n+\t\t *\n+\t\t * @param {Int}  delta     Pixels/Items. Positive means forward, negative means backward.\n+\t\t * @param {Bool} immediate Reposition immediately without an animation.\n+\t\t *\n+\t\t * @return {Void}\n+\t\t */\n+\t\tself.slideBy = function (delta, immediate) {\n+\t\t\tif (!delta) {\n+\t\t\t\treturn;\n+\t\t\t}\n+\t\t\tif (itemNav) {\n+\t\t\t\tself[centeredNav ? 'toCenter' : 'toStart'](\n+\t\t\t\t\twithin((centeredNav ? rel.centerItem : rel.firstItem) + o.scrollBy * delta, 0, items.length)\n+\t\t\t\t);\n+\t\t\t} else {\n+\t\t\t\tslideTo(pos.dest + delta, immediate);\n+\t\t\t}\n+\t\t};\n+\n+\t\t/**\n+\t\t * Animate SLIDEE to a specific position.\n+\t\t *\n+\t\t * @param {Int}  pos       New position.\n+\t\t * @param {Bool} immediate Reposition immediately without an animation.\n+\t\t *\n+\t\t * @return {Void}\n+\t\t */\n+\t\tself.slideTo = function (pos, immediate) {\n+\t\t\tslideTo(pos, immediate);\n+\t\t};\n+\n+\t\t/**\n+\t\t * Core method for handling `toLocation` methods.\n+\t\t *\n+\t\t * @param  {String} location\n+\t\t * @param  {Mixed}  item\n+\t\t * @param  {Bool}   immediate\n+\t\t *\n+\t\t * @return {Void}\n+\t\t */\n+\t\tfunction to(location, item, immediate) {\n+\t\t\t// Optional arguments logic\n+\t\t\tif (type(item) === 'boolean') {\n+\t\t\t\timmediate = item;\n+\t\t\t\titem = undefined;\n+\t\t\t}\n+\n+\t\t\tif (item === undefined) {\n+\t\t\t\tslideTo(pos[location], immediate);\n+\t\t\t} else {\n+\t\t\t\t// You can't align items to sides of the frame\n+\t\t\t\t// when centered navigation type is enabled\n+\t\t\t\tif (centeredNav && location !== 'center') {\n+\t\t\t\t\treturn;\n+\t\t\t\t}\n+\n+\t\t\t\tvar itemPos = self.getPos(item);\n+\t\t\t\tif (itemPos) {\n+\t\t\t\t\tslideTo(itemPos[location], immediate, !centeredNav);\n+\t\t\t\t}\n+\t\t\t}\n+\t\t}\n+\n+\t\t/**\n+\t\t * Animate element or the whole SLIDEE to the start of the frame.\n+\t\t *\n+\t\t * @param {Mixed} item      Item DOM element, or index starting at 0. Omitting will animate SLIDEE.\n+\t\t * @param {Bool}  immediate Reposition immediately without an animation.\n+\t\t *\n+\t\t * @return {Void}\n+\t\t */\n+\t\tself.toStart = function (item, immediate) {\n+\t\t\tto('start', item, immediate);\n+\t\t};\n+\n+\t\t/**\n+\t\t * Animate element or the whole SLIDEE to the end of the frame.\n+\t\t *\n+\t\t * @param {Mixed} item      Item DOM element, or index starting at 0. Omitting will animate SLIDEE.\n+\t\t * @param {Bool}  immediate Reposition immediately without an animation.\n+\t\t *\n+\t\t * @return {Void}\n+\t\t */\n+\t\tself.toEnd = function (item, immediate) {\n+\t\t\tto('end', item, immediate);\n+\t\t};\n+\n+\t\t/**\n+\t\t * Animate element or the whole SLIDEE to the center of the frame.\n+\t\t *\n+\t\t * @param {Mixed} item      Item DOM element, or index starting at 0. Omitting will animate SLIDEE.\n+\t\t * @param {Bool}  immediate Reposition immediately without an animation.\n+\t\t *\n+\t\t * @return {Void}\n+\t\t */\n+\t\tself.toCenter = function (item, immediate) {\n+\t\t\tto('center', item, immediate);\n+\t\t};\n+\n+\t\t/**\n+\t\t * Get the index of an item in SLIDEE.\n+\t\t *\n+\t\t * @param {Mixed} item     Item DOM element.\n+\t\t *\n+\t\t * @return {Int}  Item index, or -1 if not found.\n+\t\t */\n+\t\tfunction getIndex(item) {\n+\t\t\treturn item != null ?\n+\t\t\t\t\tisNumber(item) ?\n+\t\t\t\t\t\titem >= 0 && item < items.length ? item : -1 :\n+\t\t\t\t\t\t$items.index(item) :\n+\t\t\t\t\t-1;\n+\t\t}\n+\t\t// Expose getIndex without lowering the compressibility of it,\n+\t\t// as it is used quite often throughout Sly.\n+\t\tself.getIndex = getIndex;\n+\n+\t\t/**\n+\t\t * Get index of an item in SLIDEE based on a variety of input types.\n+\t\t *\n+\t\t * @param  {Mixed} item DOM element, positive or negative integer.\n+\t\t *\n+\t\t * @return {Int}   Item index, or -1 if not found.\n+\t\t */\n+\t\tfunction getRelativeIndex(item) {\n+\t\t\treturn getIndex(isNumber(item) && item < 0 ? item + items.length : item);\n+\t\t}\n+\n+\t\t/**\n+\t\t * Activates an item.\n+\t\t *\n+\t\t * @param  {Mixed} item Item DOM element, or index starting at 0.\n+\t\t *\n+\t\t * @return {Mixed} Activated item index or false on fail.\n+\t\t */\n+\t\tfunction activate(item, force) {\n+\t\t\tvar index = getIndex(item);\n+\n+\t\t\tif (!itemNav || index < 0) {\n+\t\t\t\treturn false;\n+\t\t\t}\n+\n+\t\t\t// Update classes, last active index, and trigger active event only when there\n+\t\t\t// has been a change. Otherwise just return the current active index.\n+\t\t\tif (last.active !== index || force) {\n+\t\t\t\t// Update classes\n+\t\t\t\t$items.eq(rel.activeItem).removeClass(o.activeClass);\n+\t\t\t\t$items.eq(index).addClass(o.activeClass);\n+\n+\t\t\t\tlast.active = rel.activeItem = index;\n+\n+\t\t\t\tupdateButtonsState();\n+\t\t\t\ttrigger('active', index);\n+\t\t\t}\n+\n+\t\t\treturn index;\n+\t\t}\n+\n+\t\t/**\n+\t\t * Activates an item and helps with further navigation when o.smart is enabled.\n+\t\t *\n+\t\t * @param {Mixed} item      Item DOM element, or index starting at 0.\n+\t\t * @param {Bool}  immediate Whether to reposition immediately in smart navigation.\n+\t\t *\n+\t\t * @return {Void}\n+\t\t */\n+\t\tself.activate = function (item, immediate) {\n+\t\t\tvar index = activate(item);\n+\n+\t\t\t// Smart navigation\n+\t\t\tif (o.smart && index !== false) {\n+\t\t\t\t// When centeredNav is enabled, center the element.\n+\t\t\t\t// Otherwise, determine where to position the element based on its current position.\n+\t\t\t\t// If the element is currently on the far end side of the frame, assume that user is\n+\t\t\t\t// moving forward and animate it to the start of the visible frame, and vice versa.\n+\t\t\t\tif (centeredNav) {\n+\t\t\t\t\tself.toCenter(index, immediate);\n+\t\t\t\t} else if (index >= rel.lastItem) {\n+\t\t\t\t\tself.toStart(index, immediate);\n+\t\t\t\t} else if (index <= rel.firstItem) {\n+\t\t\t\t\tself.toEnd(index, immediate);\n+\t\t\t\t} else {\n+\t\t\t\t\tresetCycle();\n+\t\t\t\t}\n+\t\t\t}\n+\t\t};\n+\n+\t\t/**\n+\t\t * Activates a page.\n+\t\t *\n+\t\t * @param {Int}  index     Page index, starting from 0.\n+\t\t * @param {Bool} immediate Whether to reposition immediately without animation.\n+\t\t *\n+\t\t * @return {Void}\n+\t\t */\n+\t\tself.activatePage = function (index, immediate) {\n+\t\t\tif (isNumber(index)) {\n+\t\t\t\tslideTo(pages[within(index, 0, pages.length - 1)], immediate);\n+\t\t\t}\n+\t\t};\n+\n+\t\t/**\n+\t\t * Return relative positions of items based on their visibility within FRAME.\n+\t\t *\n+\t\t * @param {Int} slideePos Position of SLIDEE.\n+\t\t *\n+\t\t * @return {Void}\n+\t\t */\n+\t\tfunction getRelatives(slideePos) {\n+\t\t\tslideePos = within(isNumber(slideePos) ? slideePos : pos.dest, pos.start, pos.end);","path":"app/assets/javascripts/vendor/sly.js","position":871,"original_position":871,"commit_id":"5f11d50382cc3f28d0f906c18da28550b5251ec8","original_commit_id":"5f11d50382cc3f28d0f906c18da28550b5251ec8","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Line is too long.","created_at":"2015-07-16T14:45:57Z","updated_at":"2015-07-16T14:45:57Z","html_url":"https://github.com/sul-dlss/sul-embed/pull/299#discussion_r34794926","pull_request_url":"https://api.github.com/repos/sul-dlss/sul-embed/pulls/299","_links":{"self":{"href":"https://api.github.com/repos/sul-dlss/sul-embed/pulls/comments/34794926"},"html":{"href":"https://github.com/sul-dlss/sul-embed/pull/299#discussion_r34794926"},"pull_request":{"href":"https://api.github.com/repos/sul-dlss/sul-embed/pulls/299"}}},"pull_request":{"url":"https://api.github.com/repos/sul-dlss/sul-embed/pulls/299","id":40137024,"html_url":"https://github.com/sul-dlss/sul-embed/pull/299","diff_url":"https://github.com/sul-dlss/sul-embed/pull/299.diff","patch_url":"https://github.com/sul-dlss/sul-embed/pull/299.patch","issue_url":"https://api.github.com/repos/sul-dlss/sul-embed/issues/299","number":299,"state":"open","locked":false,"title":"[Review with Drew] Thumb preview","user":{"login":"mejackreed","id":1656824,"avatar_url":"https://avatars.githubusercontent.com/u/1656824?v=3","gravatar_id":"","url":"https://api.github.com/users/mejackreed","html_url":"https://github.com/mejackreed","followers_url":"https://api.github.com/users/mejackreed/followers","following_url":"https://api.github.com/users/mejackreed/following{/other_user}","gists_url":"https://api.github.com/users/mejackreed/gists{/gist_id}","starred_url":"https://api.github.com/users/mejackreed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mejackreed/subscriptions","organizations_url":"https://api.github.com/users/mejackreed/orgs","repos_url":"https://api.github.com/users/mejackreed/repos","events_url":"https://api.github.com/users/mejackreed/events{/privacy}","received_events_url":"https://api.github.com/users/mejackreed/received_events","type":"User","site_admin":false},"body":"Closes #292 \r\n\r\nStill needs: \r\n - [ ] Review with @aeschylus \r\n - [ ] Discuss with @aeschylus and @aalsum about testing strategy","created_at":"2015-07-16T14:45:43Z","updated_at":"2015-07-16T14:45:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e6663c39cfcd9cb025258b1c1b99520f0744a1b5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sul-dlss/sul-embed/pulls/299/commits","review_comments_url":"https://api.github.com/repos/sul-dlss/sul-embed/pulls/299/comments","review_comment_url":"https://api.github.com/repos/sul-dlss/sul-embed/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sul-dlss/sul-embed/issues/299/comments","statuses_url":"https://api.github.com/repos/sul-dlss/sul-embed/statuses/5f11d50382cc3f28d0f906c18da28550b5251ec8","head":{"label":"sul-dlss:thumb-preview","ref":"thumb-preview","sha":"5f11d50382cc3f28d0f906c18da28550b5251ec8","user":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"repo":{"id":24868135,"name":"sul-embed","full_name":"sul-dlss/sul-embed","owner":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sul-dlss/sul-embed","description":"An oEmbed Service for Stanford University Libraries","fork":false,"url":"https://api.github.com/repos/sul-dlss/sul-embed","forks_url":"https://api.github.com/repos/sul-dlss/sul-embed/forks","keys_url":"https://api.github.com/repos/sul-dlss/sul-embed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sul-dlss/sul-embed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sul-dlss/sul-embed/teams","hooks_url":"https://api.github.com/repos/sul-dlss/sul-embed/hooks","issue_events_url":"https://api.github.com/repos/sul-dlss/sul-embed/issues/events{/number}","events_url":"https://api.github.com/repos/sul-dlss/sul-embed/events","assignees_url":"https://api.github.com/repos/sul-dlss/sul-embed/assignees{/user}","branches_url":"https://api.github.com/repos/sul-dlss/sul-embed/branches{/branch}","tags_url":"https://api.github.com/repos/sul-dlss/sul-embed/tags","blobs_url":"https://api.github.com/repos/sul-dlss/sul-embed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sul-dlss/sul-embed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sul-dlss/sul-embed/git/refs{/sha}","trees_url":"https://api.github.com/repos/sul-dlss/sul-embed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sul-dlss/sul-embed/statuses/{sha}","languages_url":"https://api.github.com/repos/sul-dlss/sul-embed/languages","stargazers_url":"https://api.github.com/repos/sul-dlss/sul-embed/stargazers","contributors_url":"https://api.github.com/repos/sul-dlss/sul-embed/contributors","subscribers_url":"https://api.github.com/repos/sul-dlss/sul-embed/subscribers","subscription_url":"https://api.github.com/repos/sul-dlss/sul-embed/subscription","commits_url":"https://api.github.com/repos/sul-dlss/sul-embed/commits{/sha}","git_commits_url":"https://api.github.com/repos/sul-dlss/sul-embed/git/commits{/sha}","comments_url":"https://api.github.com/repos/sul-dlss/sul-embed/comments{/number}","issue_comment_url":"https://api.github.com/repos/sul-dlss/sul-embed/issues/comments{/number}","contents_url":"https://api.github.com/repos/sul-dlss/sul-embed/contents/{+path}","compare_url":"https://api.github.com/repos/sul-dlss/sul-embed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sul-dlss/sul-embed/merges","archive_url":"https://api.github.com/repos/sul-dlss/sul-embed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sul-dlss/sul-embed/downloads","issues_url":"https://api.github.com/repos/sul-dlss/sul-embed/issues{/number}","pulls_url":"https://api.github.com/repos/sul-dlss/sul-embed/pulls{/number}","milestones_url":"https://api.github.com/repos/sul-dlss/sul-embed/milestones{/number}","notifications_url":"https://api.github.com/repos/sul-dlss/sul-embed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sul-dlss/sul-embed/labels{/name}","releases_url":"https://api.github.com/repos/sul-dlss/sul-embed/releases{/id}","created_at":"2014-10-06T22:54:10Z","updated_at":"2015-03-27T20:45:13Z","pushed_at":"2015-07-16T14:45:43Z","git_url":"git://github.com/sul-dlss/sul-embed.git","ssh_url":"git@github.com:sul-dlss/sul-embed.git","clone_url":"https://github.com/sul-dlss/sul-embed.git","svn_url":"https://github.com/sul-dlss/sul-embed","homepage":null,"size":2460,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":50,"forks":0,"open_issues":50,"watchers":4,"default_branch":"master"}},"base":{"label":"sul-dlss:master","ref":"master","sha":"d9a43babde50a054320ad477ac3d997c8ec9f43b","user":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"repo":{"id":24868135,"name":"sul-embed","full_name":"sul-dlss/sul-embed","owner":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sul-dlss/sul-embed","description":"An oEmbed Service for Stanford University Libraries","fork":false,"url":"https://api.github.com/repos/sul-dlss/sul-embed","forks_url":"https://api.github.com/repos/sul-dlss/sul-embed/forks","keys_url":"https://api.github.com/repos/sul-dlss/sul-embed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sul-dlss/sul-embed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sul-dlss/sul-embed/teams","hooks_url":"https://api.github.com/repos/sul-dlss/sul-embed/hooks","issue_events_url":"https://api.github.com/repos/sul-dlss/sul-embed/issues/events{/number}","events_url":"https://api.github.com/repos/sul-dlss/sul-embed/events","assignees_url":"https://api.github.com/repos/sul-dlss/sul-embed/assignees{/user}","branches_url":"https://api.github.com/repos/sul-dlss/sul-embed/branches{/branch}","tags_url":"https://api.github.com/repos/sul-dlss/sul-embed/tags","blobs_url":"https://api.github.com/repos/sul-dlss/sul-embed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sul-dlss/sul-embed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sul-dlss/sul-embed/git/refs{/sha}","trees_url":"https://api.github.com/repos/sul-dlss/sul-embed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sul-dlss/sul-embed/statuses/{sha}","languages_url":"https://api.github.com/repos/sul-dlss/sul-embed/languages","stargazers_url":"https://api.github.com/repos/sul-dlss/sul-embed/stargazers","contributors_url":"https://api.github.com/repos/sul-dlss/sul-embed/contributors","subscribers_url":"https://api.github.com/repos/sul-dlss/sul-embed/subscribers","subscription_url":"https://api.github.com/repos/sul-dlss/sul-embed/subscription","commits_url":"https://api.github.com/repos/sul-dlss/sul-embed/commits{/sha}","git_commits_url":"https://api.github.com/repos/sul-dlss/sul-embed/git/commits{/sha}","comments_url":"https://api.github.com/repos/sul-dlss/sul-embed/comments{/number}","issue_comment_url":"https://api.github.com/repos/sul-dlss/sul-embed/issues/comments{/number}","contents_url":"https://api.github.com/repos/sul-dlss/sul-embed/contents/{+path}","compare_url":"https://api.github.com/repos/sul-dlss/sul-embed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sul-dlss/sul-embed/merges","archive_url":"https://api.github.com/repos/sul-dlss/sul-embed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sul-dlss/sul-embed/downloads","issues_url":"https://api.github.com/repos/sul-dlss/sul-embed/issues{/number}","pulls_url":"https://api.github.com/repos/sul-dlss/sul-embed/pulls{/number}","milestones_url":"https://api.github.com/repos/sul-dlss/sul-embed/milestones{/number}","notifications_url":"https://api.github.com/repos/sul-dlss/sul-embed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sul-dlss/sul-embed/labels{/name}","releases_url":"https://api.github.com/repos/sul-dlss/sul-embed/releases{/id}","created_at":"2014-10-06T22:54:10Z","updated_at":"2015-03-27T20:45:13Z","pushed_at":"2015-07-16T14:45:43Z","git_url":"git://github.com/sul-dlss/sul-embed.git","ssh_url":"git@github.com:sul-dlss/sul-embed.git","clone_url":"https://github.com/sul-dlss/sul-embed.git","svn_url":"https://github.com/sul-dlss/sul-embed","homepage":null,"size":2460,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":50,"forks":0,"open_issues":50,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sul-dlss/sul-embed/pulls/299"},"html":{"href":"https://github.com/sul-dlss/sul-embed/pull/299"},"issue":{"href":"https://api.github.com/repos/sul-dlss/sul-embed/issues/299"},"comments":{"href":"https://api.github.com/repos/sul-dlss/sul-embed/issues/299/comments"},"review_comments":{"href":"https://api.github.com/repos/sul-dlss/sul-embed/pulls/299/comments"},"review_comment":{"href":"https://api.github.com/repos/sul-dlss/sul-embed/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sul-dlss/sul-embed/pulls/299/commits"},"statuses":{"href":"https://api.github.com/repos/sul-dlss/sul-embed/statuses/5f11d50382cc3f28d0f906c18da28550b5251ec8"}}}}