OneNote Clipper

The clipper Bookmarklet

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

Advertisement:

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

Advertisement:

// ==UserScript==
// @name        OneNote Clipper
// @namespace   https://github.com/vylet/OneNote
// @description The clipper Bookmarklet
// @include			http://*
// @include			https://*
// @version     1.0
// @grant       none
// ==/UserScript==

var onenote = function() {
        var jsCode = document.createElement('script');
        jsCode.setAttribute('src', 'https://www.onenote.com/clipper/root?ClipperId=ON-6a191eef-84a2-4491-9cc2-2e4560cfb9af&ClipperType=Bookmarklet&ClipperVersion=2.0.2');
        jsCode.setAttribute('id', 'oneNoteCaptureRootScript');
        jsCode.setAttribute('type', 'text/javascript');
        document.body.appendChild(jsCode);
    };
(function(){
document.addEventListener('keydown', function(e) {
  // pressed ctrl+alt+o
  if (e.keyCode == 79 && !e.shiftKey && e.ctrlKey && e.altKey && !e.metaKey) {
	  console.log("Clipper Hotkey Pressed")
  onenote(); // Open OneNote Clipper.
  }
}, false);
})();