How to use the remote.getCurrentWindow function in remote

To help you get started, we’ve selected a few remote examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Algram / Hypha / app / js / util.js View on Github external
$('input').on('contextmenu', function (e) {
		// use current menu, probably the one that was built the last time spellcheck ran
		menu.popup(remote.getCurrentWindow());
		// build a new one with only select all in it
		menu = Menu.buildFromTemplate(template);
	})
}
github jimschubert / electron-aurelia-example / client / dev.js View on Github external
if(args.dev){
  // Make the main window centered, visible, and opened with dev tools
  var currentWindow = require('remote').getCurrentWindow();
  currentWindow.setSize(800, 600);
  currentWindow.center();
  currentWindow.show();
  currentWindow.openDevTools();
}
github Tasarinan / editor-framework / page / page-init.js View on Github external
window.onload = function () {
        var Remote = require('remote');
        var currentWindow = Remote.getCurrentWindow();
        currentWindow.setSize(800, 600);
        currentWindow.center();
        currentWindow.show();
        currentWindow.openDevTools();
        console.error(error.stack || error);
    };
}
github EragonJ / Kaku / src / views / components / menus / container.js View on Github external
_clickToShowContextMenu: function(playlist, event) {
    event.preventDefault();
    var menu = this._createContextMenuForPlaylist(playlist);
    menu.popup(Remote.getCurrentWindow());
  },
github officert / mongotron / src / ui / services / menuService.js View on Github external
MenuService.prototype.showMenu = menuItems => {
      let menu = new Menu();

      for (let i = 0; i < menuItems.length; i++) {
        let menuItem = menuItems[i];

        if (!menuItem.label || !menuItem.click) {
          logger.warn('MenuService - registerContextMenu - skipping menu item because it does not have either a label or a click function');
          continue;
        }

        menu.append(new MenuItem(menuItem));
      }

      menu.popup(remote.getCurrentWindow());
    };
github Algram / Hypha / app / js / index.js View on Github external
$('#messageArea').on('contextmenu', 'line', function (e) {
		e.preventDefault();
		textMenu.popup(remote.getCurrentWindow());
	})
github mohsen1 / fb-photo-fetch / app.js View on Github external
window.addEventListener('contextmenu', function (e) {
    e.preventDefault();
    menu.popup(remote.getCurrentWindow());
  }, false);
github brrd / Abricotine / app / renderer / dialogs.js View on Github external
function getWindow (win) {
    if (typeof win === "number") {
        return BrowserWindow.fromId(win);
    } else if (win instanceof BrowserWindow) {
        return win;
    } else if (win && typeof win.browserWindow !== "undefined") {
        return win.browserWindow;
    } else if (typeof remote !== "undefined") {
        return remote.getCurrentWindow();
    } else {
        return BrowserWindow.getFocusedWindow();
    }
}
github amitmerchant1990 / electron-markdownify / index.html View on Github external
document.addEventListener("keydown", function (e) {
			  if (e.which === 123) {
				  require('remote').getCurrentWindow().toggleDevTools();
			  }
		  });
github MitchDizzle / ChatLogger.JS / src / page / settings.js View on Github external
document.addEventListener("keydown", function (e) {
    if (e.which === 123) {
        require('remote').getCurrentWindow().toggleDevTools();
    } else if (e.which === 116) {
        location.reload();
    }
});

remote

Work on client-side files with a remote API server transparently

BSD
Latest version published 11 years ago

Package Health Score

39 / 100
Full package analysis

Popular remote functions