Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
insync / usr / lib / insync / ideskui / html / js / debug.js
Size: Mime:
'use strict';

/*
  Transpiled to es2015 using https://babeljs.io/repl syntax since some of our targets doesn't support es2016
*/

/*
  Only include this in the body, never in the head
*/
// TODO: make this const reference HTML_DEBUG (for linux) and its equivalent for other OS's
var DEBUG = false;

if (DEBUG) {
  // CTRL+r or F5: debug function for reloading
  document.body.onkeydown = function(e) {
    if ((e.keyCode === 82 && e.ctrlKey) || e.keyCode === 116) {
      location.reload();
    }
  };
}
/*
  Not yet implemented section.
  Add js code here for stopping undesired behavior of unimplemented features.
*/
// Drag and drop prevention

function disableDrop(event) {
  event.dataTransfer.dropEffect = 'none';
  event.stopPropagation();
  event.preventDefault();
}

document.ondrop = disableDrop;
document.ondragover = disableDrop;
document.ondragenter = disableDrop;