js: remake link insertion without document.execCommand