node package manager
We need your input. Help make JavaScript better: Take the 2017 JavaScript Ecosystem survey »


Sho[o]tEm Unofficial Instabug Web SDK

Instabug WEB SDK Clone with missing features.


We have 4 main functionality:

  • capture the page.
  • annotating or drawing on the shot.
  • capture user data and collect input.
  • sending to instabug backend.


Whats wrong with current impelementation ]

  • Promise dosn't polyfilled so screen capture dosn't work in IE [].
  • Not giving back respose if page take long to capture (due speed of internet). And shall give a way to cancel.
  • No code spliting, don't load all code at one for ex. capturer only needed when we starting the report.
  • Scrolling Proplem: we shall prevent user scroll while bug reporting.
  • No support for mobile (UI and touch drawing).
  • In screen captcher html2canvas:
    • some problems with css.
    • many proplems with custom scrolling.
    • Arabic text
    • Video
    • Iframes [big problem]
    • SVG [need sceond look up]

Posable Solutions

  • for polyfill, its simple just polyfill it.
  • for feedback while capturing, give feedback; but giving way to cancel its problem with promises, we could cancel user interface and ignore the result or dig more and change html2canvas to implement cancellation token.
  • for separate javascript screen capture, could we?
  • for scrolling proplem, do it like every modal libraries do it; add class to body that hide the overflow.
  • for mobile support, more work :).
  • for screen capture, dig for gold.

Added Fueatures

  • support mobile ui and touch drawing.
  • pen color and size.
  • detect shape drawing, for now just rectangels.

Things to imporove

  • smooth drawing path.
  • detect the rest of basic shapes.
  • cptcure videos.



  • domReady
  • HTML2Canvas
  • @TBD


  • babel
  • webpack 2
  • postcss
  • @TBD

Run & Build

install deps

$ yarn install

start in dev mode

$ yarn start

build and start preview server

$ yarn start:prod

just build

$ yarn build

build and start stats interactive mode

$ yarn build:stats

Exposed API

Instabug Web SDK API {ibgSDK}

current suggestion description
init ok, may take setting not just token
reportBug ok
resetAndClose ok, change to: close/closeBugReport
instabugLog ok, change to: log
userData ok, Ummm! change the name add user data
getLogs Ummm! not exposed
submitReport not exposed
ViewSubmitView not exposed
downloadExtension not exposed
takeScreenShotFromJavaScript not exposed
getLocalStorage not exposed undefined

Embeding Script

// instabug sdk preview => c48e32c9888e063a107eb5d6ad75e70a 
// => 5f01963068b91474d92c6867ba46d952 
// => a5910f2df0ad8a695c0319bcee492993 
// https://instabug.mohamedhegazy/static/sdk 
// put this wherever you like but before ibgSdk.init() 
    token: 'a5910f2df0ad8a695c0319bcee492993',
    callback: function() {}
window._instabug = {
    token: 'a5910f2df0ad8a695c0319bcee492993'
// {token:"a5910f2df0ad8a695c0319bcee492993",v:'1.1.0'}; 


  • Chrome Extension: gbhnbcggjeokebhgalmgkbhkabpjmnda