NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name кнопка "Хорошо" // @namespace https://openuserjs.org/scripts/maks4339/кнопка_Хорошо // @updateURL https://openuserjs.org/install/maks4339/кнопка_Хорошо.user.js // @download https://openuserjs.org/install/maks4339/кнопка_Хорошо.user.js // @include *vk.com*im* // @description отправляет сообщение "Хорошо" в ВКонтакте // @version 1.1 // @grant none // @copyright 2015, Maks // ==/UserScript== function $_GET(key) { var s = window.location.search; s = s.match(new RegExp(key + '=([^&=]+)')); return s ? s[1] : false; } function BGrefresh(){ if(!document.getElementById("ButtonGoodId")){ var butt = document.createElement("div"); butt.innerHTML = "Хорошо"; butt.style.marginTop="2px"; butt.style.paddingLeft="27px"; butt.style.paddingRight="27px"; butt.className="flat_button im_send_cont fl_l"; butt.id="ButtonGoodId"; butt.onclick=function(){ document.getElementById("im_editable"+$_GET('sel')).innerHTML='Хорошо'; document.getElementById('im_send').click(); } document.getElementById("im_write_form").appendChild(butt); var butt2 = document.createElement("div"); butt2.innerHTML = "Да"; butt2.style.marginTop="2px"; butt2.style.paddingLeft="27px"; butt2.style.paddingRight="27px"; butt2.className="flat_button im_send_cont fl_l"; butt2.id="ButtonGoodId2"; butt2.onclick=function(){ document.getElementById("im_editable"+$_GET('sel')).innerHTML='Да'; document.getElementById('im_send').click(); } document.getElementById("im_write_form").appendChild(butt2); var butt3 = document.createElement("div"); butt3.innerHTML = "Нет"; butt3.style.marginTop="2px"; butt3.style.paddingLeft="27px"; butt3.style.paddingRight="27px"; butt3.className="flat_button im_send_cont fl_l"; butt3.id="ButtonGoodId3"; butt3.onclick=function(){ document.getElementById("im_editable"+$_GET('sel')).innerHTML='Нет'; document.getElementById('im_send').click(); } document.getElementById("im_write_form").appendChild(butt3); var butt4 = document.createElement("div"); butt4.innerHTML = "Ага"; butt4.style.marginTop="2px"; butt4.style.paddingLeft="27px"; butt4.style.paddingRight="27px"; butt4.className="flat_button im_send_cont fl_l"; butt4.id="ButtonGoodId4"; butt4.onclick=function(){ document.getElementById("im_editable"+$_GET('sel')).innerHTML='Ага'; document.getElementById('im_send').click(); } document.getElementById("im_write_form").appendChild(butt4); } setTimeout(BGrefresh, 300); } BGrefresh();