Skip to content

Instantly share code, notes, and snippets.

@grantmiller
grantmiller / customDictionary.m
Created October 15, 2011 01:00
Look IO Custom Dictionary
[LIOLookIOManager sharedLookIOManager].sessionExtras = [NSDictionary dictionaryWithObjectsAndKeys:@"[email protected]", @"email",
@"John Doe", @"name",
@"1234567890", @"some_id",
nil];
@grantmiller
grantmiller / LP-Mobile-Web.html
Created August 9, 2012 22:34
LP Mobile Web Integration: Basic
<script type="text/javascript" src="https://d3tpuxked45kzt.cloudfront.net/lp_lib/liveperson.js"></script>
<script type="text/javascript">new LIVEPERSON('##YOUR MOBILE SITE ID##');</script>
@grantmiller
grantmiller / LP-Mobile-Meta.html
Created August 9, 2012 22:41
LP Mobile Meta Tag
<meta name="viewport" content="user-scalable=0, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
@grantmiller
grantmiller / LP-Mobile-Web-Adv.html
Created August 10, 2012 00:45
LP Mobile Advanced Integration Options
<script type="text/javascript" src="https://d3tpuxked45kzt.cloudfront.net/lp_lib/liveperson.js"></script>
<script type="text/javascript">
var _lpcfg = {
triggerSelector : '.hlpBtn', // Replace with a selector to your help button(s)
extras : function() {
var extras = {'varName1': 'varValue1',
'varName2': 'varValue2'};
return extras;
},
onChatDisabled : function(els) {
@grantmiller
grantmiller / gist:4004805
Last active October 12, 2015 09:18
LP Mobile Aysnc Advanced Integration Options
<script type="text/javascript">
/* LP Mobile JS Configuration */
var _LP_CFG_ = {
app_id : "YOUR_MOBILE_SITE_ID",
options : {
// All configuration options defined in here
//chatDisabled : true, // Only to be used on unsupported pages
triggerSelector : '.help-btn', // Replace with a selector to your help button(s)
extras : function() { // A static dictionary or a function that returns a dictionary of custom variables
var extras = {'varName1': 'varValue1',
@grantmiller
grantmiller / gist:4004997
Last active October 12, 2015 09:17
LP Mobile Web Integration Async: Basic
<script type="text/javascript">
/* LP Mobile JS Configuration */
var _LP_CFG_ = {
app_id : "YOUR_MOBILE_SITE_ID"
};
/* End of Configuration */
</script>
<!-- NEW LIVE PERSON CODE -->
<script type="text/javascript">
/* LP Mobile JS Configuration */
var _LP_CFG_ = {
app_id : "f2c05834",
options : {
// All configuration options defined in here
extras : function() { // A static dictionary or a function that returns a dictionary of custom variables
var extras = {'keyCode': '000016726'};
return extras;
- (id)lookIOManager:(LIOLookIOManager *)aManager linkViewForURL:(NSURL *)aURL
{
if ([[aURL host] isEqualToString:@"product"])
{
NSString *numString = [aURL lastPathComponent];
if ([numString length])
{
int productId = [numString intValue];
if (productId < 6 && productId >= 0)
{
@grantmiller
grantmiller / lp-mobile-strings.erl
Last active December 11, 2015 23:59
Chinese SC Strings for LP Mobile iOS
"LIOEmailPlaceholder" = "[email protected]";
"LIOAltChatViewController.EmailChatButton" = "电邮谘询";
"LIOAltChatViewController.EndSessionButton" = "结束会话";
"LIOAltChatViewController.ReconnectionLabel" = "正在重新连接...";
"LIOAltChatViewController.ReconnectionHideButton" = "隐藏";
"LIOAltChatViewController.LocalNameLabel" = "我";
"LIOAltChatViewController.AgentTypingNotification" = "客户服务代表正在输入...";
"LIOChatBubbleView.LinkAlert" = "您要离开这个应用程式,然后浏览\"%@\"吗?";
@grantmiller
grantmiller / Chinese TC native strings
Created February 8, 2013 18:55
LP Mobile Strings traditional chinese
"LIOEmailPlaceholder" = "[email protected]";
"LIOAltChatViewController.EmailChatButton" = "Email Chat";
"LIOAltChatViewController.EndSessionButton" = "End Session";
"LIOAltChatViewController.ReconnectionLabel" = "Reconnecting...";
"LIOAltChatViewController.ReconnectionHideButton" = "Hide";
"LIOAltChatViewController.LocalNameLabel" = "Me";
"LIOAltChatViewController.AgentTypingNotification" = "Agent is typing...";
"LIOChatBubbleView.LinkAlert" = "Are you sure you want to leave the app and visit \"%@\"?";