-
Notifications
You must be signed in to change notification settings - Fork 0
/
injectiontest.js
31 lines (22 loc) · 904 Bytes
/
injectiontest.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
console.log('START injectiontest.js');
(function ($){
console.log('START injectiontest.js: self initializing function');
console.log('$ is');
console.log($);
document.onmouseup = function(){
console.log('test document.onmouseup');
console.log('window.getSelection.toString()');
console.log(window.getSelection().toString());
//!!TODO WHEN THIS AJAX IS UNCOMMENTED, IT BREAKS THE ABOVE document.onmouseup = function() { //stuff }
//!!TODO WHEN THIS AJAX IS UNCOMMENTED, IT BREAKS THE ABOVE document.onmouseup = function() { //stuff }
//!!TODO WHEN THIS AJAX IS UNCOMMENTED, IT BREAKS THE ABOVE document.onmouseup = function() { //stuff }
reqwest({
url: 'http://127.0.0.1:3003/endpoint',
method: 'post',
data: {"text": window.getSelection().toString()},
success: function(resp){
console.log(resp);
}
})
};
})(jQuery);