Pendo使っていると頻繁に使うコマンドがあります
pendo.enableDebugger()
ガイドのテストやAgentの状態を調べるためのデバッガー
pendo.designerv2.launchInAppDesigner()
ガイド作成やタグ付けをアプリから直接できるVDS
いちいちコマンドコンソール開いて上記コマンド打つのもめんどくさい
そこでbookmarkletにして保存しておけば便利なんじゃないかと
任意の機能がいつでも起動できるようにしてみた。
元ソース
https://gist.github.com/Band-Aid/bc094291621120c214095209cdc69ee4
javascript:(function()%7B(function()%7B%0A function removeDialog() %7B%0A document.body.removeChild(document.getElementById('customDialog'))%3B%0A %7D%0A%0A function functionDebugger() %7B%0A try %7B%0A pendo.enableDebugging()%3B%0A %7D catch (e) %7B%0A console.log('Pendo VDS is not available.')%3B%0A %7D%0A removeDialog()%3B%0A %7D%0A%0A function functionVDS() %7B%0A try %7B%0A pendo.designerv2.launchInAppDesigner()%3B%0A %7D catch (e) %7B%0A console.log('Pendo VDS is not available.')%3B%0A %7D%0A removeDialog()%3B%0A %7D%0A%0A function functionCloseDebugger()%7B%0A try %7B%0A pendo.disableDebugging()%3B%0A %7D catch (e) %7B%0A console.log('Something went wrong disbaling the debugger.')%3B%0A %7D%0A removeDialog()%3B%0A %7D%0A%0A if (document.getElementById('customDialog')) %7B%0A %0A return%3B%0A %7D%0A %2F%2F Create the dialog container%0A var dialog %3D document.createElement('div')%3B%0A dialog.id %3D 'customDialog'%3B%0A dialog.style.position %3D 'fixed'%3B%0A dialog.style.top %3D '20%25'%3B%0A dialog.style.left %3D '50%25'%3B%0A dialog.style.transform %3D 'translate(-50%25%2C -50%25)'%3B%0A dialog.style.backgroundColor %3D 'white'%3B%0A dialog.style.padding %3D '20px'%3B%0A dialog.style.zIndex %3D 1000%3B%0A dialog.style.borderRadius %3D '8px'%3B%0A dialog.style.boxShadow %3D '0 4px 6px rgba(0%2C0%2C0%2C0.1)'%3B%0A dialog.style.zIndex %3D 100000000%3B%0A %2F%2F Add buttons to the dialog%0A var buttonOne %3D document.createElement('button')%3B%0A buttonOne.innerText %3D 'Pendo Debugger'%3B%0A buttonOne.onclick %3D functionDebugger%3B%0A%0A var buttonTwo %3D document.createElement('button')%3B%0A buttonTwo.innerText %3D 'Pendo VDS'%3B%0A buttonTwo.onclick %3D functionVDS%3B%0A%0A var buttonThree %3D document.createElement('button')%3B%0A buttonThree.innerText %3D 'Disable Debugger'%3B%0A buttonThree.onclick %3D functionCloseDebugger%3B%0A%0A %2F%2F Append buttons to dialog%0A dialog.appendChild(buttonOne)%3B%0A dialog.appendChild(document.createTextNode(' '))%3B %2F%2F Spacer%0A dialog.appendChild(buttonTwo)%3B%0A dialog.appendChild(document.createTextNode(' '))%3B %2F%2F Spacer%0A dialog.appendChild(buttonThree)%3B%0A%0A %2F%2F Append dialog to body%0A document.body.appendChild(dialog)%3B%0A%7D)()%3B%7D)()%3B