Bookmarklet
HTM L код выделеного
------------------------------------------------
------------------------------------------------
function getSelectionHtml() { var html = "";
if (typeof window.getSelection != "undefined") {
var sel = window.getSelection();
if (sel.rangeCount) {
var container = document.createElement("div");
for (var i = 0, len = sel.rangeCount; i < len; ++i) {
container.appendChild(sel.getRangeAt(i).cloneContents());
}
html = container.innerHTML;
}
} else if (typeof document.selection != "undefined") {
if (document.selection.type == "Text") {
html = document.selection.createRange().htmlText;
}
}
return html;
}
alert(getSelectionHtml());
------------------------------------------------
javascript:(function()%7Bfunction%20getSelectionHtml()%20%7Bvar%20html%20%3D%20%22%22%3Bif%20(typeof%20window.getSelection%20!%3D%20%22undefined%22)%20%7Bvar%20sel%20%3D%20window.getSelection()%3Bif%
20(sel.rangeCount)%20%7Bvar%20container%20%3D%20document.createElement(%22div%22)%3Bfor%20(var%20i%20%3D%200%2C%20len%20%3D%20sel.rangeCount%3B%20i%20%3C%20len%3B%20%2B%2Bi)%20%7Bcontainer.appendChild
(sel.getRangeAt(i).cloneContents())%3B%7Dhtml%20%3D%20container.innerHTML%3B%7D%7D%20else%20if%20(typeof%20document.selection%20!%3D%20%22undefined%22)%20%7Bif%20(document.selection.type%20%3D%3D%20%
22Text%22)%20%7Bhtml%20%3D%20document.selection.createRange().htmlText%3B%7D%7Dreturn%20html%3B%7Dalert(getSelectionHtml())%7D)()
------------------------------------------------
------------------------------------------------
HTM L код выделеного
------------------------------------------------
------------------------------------------------
function getSelectionHtml() { var html = "";
if (typeof window.getSelection != "undefined") {
var sel = window.getSelection();
if (sel.rangeCount) {
var container = document.createElement("div");
for (var i = 0, len = sel.rangeCount; i < len; ++i) {
container.appendChild(sel.getRangeAt(i).cloneContents());
}
html = container.innerHTML;
}
} else if (typeof document.selection != "undefined") {
if (document.selection.type == "Text") {
html = document.selection.createRange().htmlText;
}
}
return html;
}
alert(getSelectionHtml());
------------------------------------------------
javascript:(function()%7Bfunction%20getSelectionHtml()%20%7Bvar%20html%20%3D%20%22%22%3Bif%20(typeof%20window.getSelection%20!%3D%20%22undefined%22)%20%7Bvar%20sel%20%3D%20window.getSelection()%3Bif%
20(sel.rangeCount)%20%7Bvar%20container%20%3D%20document.createElement(%22div%22)%3Bfor%20(var%20i%20%3D%200%2C%20len%20%3D%20sel.rangeCount%3B%20i%20%3C%20len%3B%20%2B%2Bi)%20%7Bcontainer.appendChild
(sel.getRangeAt(i).cloneContents())%3B%7Dhtml%20%3D%20container.innerHTML%3B%7D%7D%20else%20if%20(typeof%20document.selection%20!%3D%20%22undefined%22)%20%7Bif%20(document.selection.type%20%3D%3D%20%
22Text%22)%20%7Bhtml%20%3D%20document.selection.createRange().htmlText%3B%7D%7Dreturn%20html%3B%7Dalert(getSelectionHtml())%7D)()
------------------------------------------------
------------------------------------------------
ПоискВыделенногоGoogle.txt
3.1 KB
-----------------------------------------------
-----------------------------------------------
<script>
function searchGoogle() {
var selected
if (window.getSelection) selected = window.getSelection()
else if (document.getSelection) selected = document.getSelection()
else selected = document.selection.createRange().text
var q = "" + selected
if (q) location="http://www.google.com/search?q="+encodeURIComponent(q);
void 0;
}
</script>
---------------
<a href="javascript:searchGoogle();">Искать выделенное</a>
---------------
javascript:searchGoogle();
---------------
javascript:(function(){ var selected; if (window.getSelection) selected = window.getSelection(); else if (document.getSelection) selected = document.getSelection(); else selected =
document.selection.createRange().text; var q = ''+selected; if (q) location='http://www.google.com/search?q='+encodeURIComponent(q);})();
-----------------------------------------------
-----------------------------------------------
-----------------------------------------------
<script>
function searchGoogle() {
var selected
if (window.getSelection) selected = window.getSelection()
else if (document.getSelection) selected = document.getSelection()
else selected = document.selection.createRange().text
var q = "" + selected
if (q) location="http://www.google.com/search?q="+encodeURIComponent(q);
void 0;
}
</script>
---------------
<a href="javascript:searchGoogle();">Искать выделенное</a>
---------------
javascript:searchGoogle();
---------------
javascript:(function(){ var selected; if (window.getSelection) selected = window.getSelection(); else if (document.getSelection) selected = document.getSelection(); else selected =
document.selection.createRange().text; var q = ''+selected; if (q) location='http://www.google.com/search?q='+encodeURIComponent(q);})();
-----------------------------------------------
-----------------------------------------------
Создатель с букмарклета включателем скриптов
https://mrcoles.com/bookmarklet/
https://mrcoles.com/bookmarklet/
Mrcoles
Bookmarklet Creator with Script Includer - Peter Coles
A simple web based tool to convert JavaScript into a bookmarklet and optionally include external scripts, like jQuery. There is an automated demo included at the bottom of the page.
Подключить Внешние Скрипты :
-----------------------------------------------
...
var script=document.createElement('script')
script.src='http://my.bookmarklet.ru/myscript.js'
document.getElementsByTagName('head')[0].appendChild(script)
...
-----------------------------------------------
-----------------------------------------------
-----------------------------------------------
...
var script=document.createElement('script')
script.src='http://my.bookmarklet.ru/myscript.js'
document.getElementsByTagName('head')[0].appendChild(script)
...
-----------------------------------------------
-----------------------------------------------
HtmlTxt_ИзвлечьТекстВеб.html
24.2 KB
Как онлайн извлечь текст с веб-страницы
https://apsolyamov.ru/blog/kak_onlajn_izvlech_tekst_s_veb_stranicy/2021-05-06-369
https://apsolyamov.ru/blog/kak_onlajn_izvlech_tekst_s_veb_stranicy/2021-05-06-369
Как онлайн извлечь текст с веб-страницы
--------------------------------------------------------------------------------
Скопируйте и вставьте ссылку (URL). Сервис преобразует содержимое страницы в простой текст и представит его в виде txt или html-файла.
--------------------------------------------------------------------------------
https://www.w3.org/services/html2txt
https://www.onlineconverter.com/html-to-txt
https://www.textise.net/
https://calculators.vip/ru/skopirovat-tekst-s-sayta-onlayn/
https://document.online-convert.com/ru/convert-to-txt
https://totheweb.com/learning_center/tools-convert-html-text-to-plain-text-for-content-review/
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Скопируйте и вставьте ссылку (URL). Сервис преобразует содержимое страницы в простой текст и представит его в виде txt или html-файла.
--------------------------------------------------------------------------------
https://www.w3.org/services/html2txt
https://www.onlineconverter.com/html-to-txt
https://www.textise.net/
https://calculators.vip/ru/skopirovat-tekst-s-sayta-onlayn/
https://document.online-convert.com/ru/convert-to-txt
https://totheweb.com/learning_center/tools-convert-html-text-to-plain-text-for-content-review/
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Onlineconverter
HTML to TXT Converter: Convert HTML Document to TXT Document (Free)
Convert your HTML (HyperText Markup Language) document files to TXT (Plain Text) document files. Free online HTML to TXT ebook file converter.
Букмарклеты
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
https://apsolyamov.ru/blog/bukmarklety/2016-11-16-232
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
https://apsolyamov.ru/blog/bukmarklety/2016-11-16-232
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
apsolyamov.ru
Букмарклеты - Заметки
Букмарклеты: как установить, как пользоваться. Список полезных букмарклетов
javascript ИЗМЕНЕНИЯ HTMl
----------------------------------------------------------------------------
https://learn.javascript.ru/modifying-document#%D1%83%D0%B4%D0%B0%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5-%D1%83%D0%B7%D0%BB%D0%BE%D0%B2-removechild
----------------------------------------------------------------------------
https://learn.javascript.ru/modifying-document#%D1%83%D0%B4%D0%B0%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5-%D1%83%D0%B7%D0%BB%D0%BE%D0%B2-removechild
JavaScript: удалить <div> блок через id
---------------------------------------------------------------------------
https://ru.stackoverflow.com/questions/565547/javascript-%D1%83%D0%B4%D0%B0%D0%BB%D0%B8%D1%82%D1%8C-div-%D0%B1%D0%BB%D0%BE%D0%BA-%D1%87%D0%B5%D1%80%D0%B5%D0%B7-id
---------------------------------------------------------------------------
---------------------------------------------------------------------------
https://ru.stackoverflow.com/questions/565547/javascript-%D1%83%D0%B4%D0%B0%D0%BB%D0%B8%D1%82%D1%8C-div-%D0%B1%D0%BB%D0%BE%D0%BA-%D1%87%D0%B5%D1%80%D0%B5%D0%B7-id
---------------------------------------------------------------------------
Stack Overflow на русском
JavaScript: удалить <div> блок через id
Подскажите, пожалуйста, как в JavaScript(без использования jQuery и пр. библиотек) удалить полностью конструкцию блока <div id="id1"></div> и его содержиоме:
<div id="main">
...
<div id="main">
...