Skip to content

Instantly share code, notes, and snippets.

View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src=""></script>
<style id="jsbin-css">
.page {
display: none;
bluemango / expand.js
Created Jun 9, 2016
Expand foldable section.js
View expand.js
$(document).ready(function($) {
if (window.location.hash) {
var anchor = window.location.hash;
var el = $(anchor);
var parents = $(el).parents('.nested-article');
location.hash = null;
location.hash = anchor;
View ScreenSteps Remote Authentication
Given these values:
first_name: 'bob'
email: ''
timestamp: '1461844665'
token: 'abc123'
The canoncial string should equal: 'bobbob@mail.comabc1231461844665'
The hash should equal: '833896248e2e157e7ea3561afaa38164'
bluemango / screensteps-zendesk.js
Last active Aug 12, 2016
Zendesk JS for foldable sections
View screensteps-zendesk.js
// Begin ScreenSteps
$(document).ready(function() {
$('.screensteps-foldable-content-parent').click(function(event) {
var stepId = $('id').split('screensteps-step-')[1];
if (stepId) {
var contentId = ["nested-step", stepId].join("-");
bluemango / gist:639d9e5390cb19b4137c
Last active Aug 29, 2015
ScreenSteps Help Widget
View gist:639d9e5390cb19b4137c
<script type='text/javascript'>
window.__screensteps = {
'account': '{{your_account_name}}',
'site': '{{your_site_id}}',
'title': '',
'promptMessage': 'Enter a search term above to find an answer to your question.',
'searchFieldPrompt': '',
'viewAllUrl': '{{url_to_your_screensteps_site_table_of_contents}}',
'extraHelpLinkText': 'Contact support',
'extraHelpLinkUrl': '{{url_to_support_contact_page}}',
bluemango / gist:1b2b6feb1c8cf20ff0f2
Created Dec 5, 2014
Add external link to ScreenSteps table of contents
View gist:1b2b6feb1c8cf20ff0f2
jQuery(document).ready(function($) {
var link = '<li class="screenstepslive-manual"> <a href="/m/11169">Getting Started</a> </li>';
var list = jQuery('ul.asset-list')[0];
bluemango / gist:417064405eba81f1326e
Created Sep 17, 2014
Multi language Zendesk search replace
View gist:417064405eba81f1326e
// Adpated from,19-20,23
// Just add the appropriate strings for the languages you want to support
//strip whitespaces from Language-selector
function trim11 (str)
str = str.replace(/^\s+/, '');
bluemango / gist:b2b17f572aa25bd9be23
Created Jul 21, 2014
Zendesk out of office email
View gist:b2b17f572aa25bd9be23
Agent {{ticket.assignee.first_name}}'s Ticket {{}} Has Been Updated - can you take a look?
Hi guys,
{{ticket.assignee.first_name}} is out of the office and one of his tickets has been updated. Can you check it out?
bluemango / gist:9002559
Last active Aug 29, 2015
Javascript to set ScreenSteps alt tags that match step titles to ""
View gist:9002559
<script type="text/javascript" language="Javascript" >
jQuery(document).ready(function($) {
$('.step').each(function(index) {
var title_tag = $(this).find('>h2');
title_tag = title_tag || $(this).find('>h3');
var img = $(this).find('img');
if ($(title_tag).text() == $(img).attr('alt')) {
$(img).attr('alt', '');
bluemango / Our ScreenSteps Overrides.css
Created Sep 19, 2013
The overrides we use for CSS on our own ScreenSteps site
View Our ScreenSteps Overrides.css
#screensteps-content-wrapper { margin-top: 40px; font-size: 14px;}
#screensteps-content-wrapper li ul,
#screensteps-content-wrapper li ol { margin: 0 1.5em; }
#screensteps-content-wrapper ul { list-style: disc; }
#screensteps-content-wrapper ol { list-style: decimal; }
#screensteps-content-wrapper { line-height:normal;}
#screensteps-content-wrapper a { text-decoration:underline;}
#screensteps-content-wrapper ul li,
#screensteps-content-wrapper ol li { margin-bottom: 10px; }
#screensteps-content-wrapper .asset-list li a { line-height: 19px;}