mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-01-31 04:13:49 +01:00
js: drop IE support
This commit is contained in:
parent
4332b70363
commit
fd309443ea
@ -97,14 +97,7 @@ $(document).ready(function(){
|
||||
// console.log('Deselecting text');
|
||||
selection.removeAllRanges();
|
||||
|
||||
if (document.selection) {
|
||||
// IE
|
||||
body.focus();
|
||||
var sel = document.selection.createRange();
|
||||
sel.text = quote;
|
||||
body.focus();
|
||||
} else if (body.selectionStart || body.selectionStart == '0') {
|
||||
// Mozilla
|
||||
if (body.selectionStart || body.selectionStart == '0') {
|
||||
var start = body.selectionStart;
|
||||
var end = body.selectionEnd;
|
||||
|
||||
|
@ -307,12 +307,7 @@ function citeReply(id, with_link) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (document.selection) {
|
||||
// IE
|
||||
textarea.focus();
|
||||
let sel = document.selection.createRange();
|
||||
sel.text = '>>' + id + '\n';
|
||||
} else if (textarea.selectionStart || textarea.selectionStart == '0') {
|
||||
if (textarea.selectionStart || textarea.selectionStart == '0') {
|
||||
let start = textarea.selectionStart;
|
||||
let end = textarea.selectionEnd;
|
||||
textarea.value = textarea.value.substring(0, start) + '>>' + id + '\n' + textarea.value.substring(end, textarea.value.length);
|
||||
|
Loading…
x
Reference in New Issue
Block a user