Skip to content

Instantly share code, notes, and snippets.

View TheGP's full-sized avatar
💭
Hold on. I'm recompiling the universe...

Eugene Bos TheGP

💭
Hold on. I'm recompiling the universe...
View GitHub Profile
@TheGP
TheGP / gist:1b221e22ab29caef5554
Last active August 29, 2015 14:14
smartresponder bookmarklet setting tags to every link in an email
var waiting_popup = null;
function proclick() {
waiting_popup = null;
if (0 != $('#module #links_area button.convetror').length) {
$('#module #links_area button.convetror').first().trigger('click');
if (0 != $('div.convertor_area:visible input[type=button].btn-green').length) {
$('div.convertor_area:visible input[type=button].btn-green').trigger('click');
@TheGP
TheGP / gist:92116605ebdc5b250ee0
Created January 28, 2015 15:06
Image background preloader
function preload(arrayOfImages) {
jQuery(arrayOfImages).each(function(){
jQuery('<img/>')[0].src = this;
});
}
jQuery(document).ready(function(){
jQuery('[background]').each(function(){ image_cache.push(jQuery(this).attr('background')); });
preload(image_cache);
});
@TheGP
TheGP / gist:49292a0608526c20c1a6
Created November 25, 2014 10:03
Speak random number in google translator
(function () {
function loadScript(url, callback) {
var script = document.createElement("script")
script.type = "text/javascript";
if (script.readyState) { //IE
script.onreadystatechange = function () {
if (script.readyState == "loaded" || script.readyState == "complete") {
script.onreadystatechange = null;
callback();
}
jQuery(document).ready(function(){
if (is_broser_mobile()) {
jQuery('.class or #id').hide();
}
});
function is_broser_mobile() {
var a = navigator.userAgent||navigator.vendor||window.opera;
return (/android.+mobile|ipad|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(
@TheGP
TheGP / gist:bb4fe464e90b9f9e7118
Last active August 29, 2015 14:09
cb turn off by click on the links
<script>
jQuery(document).ready(function(){
jQuery('#uLogin2f3171a9 div').click(function(){
comebacker['settings']['launch'] = false;
});
})
</script>
<!--Начало кода "Попапа" (id:82)--><script type="text/javascript">(function(d,w){n=d.getElementsByTagName("script")[0],s=d.createElement("script"),f=function(){n.parentNode.insertBefore(s,n);};s.type="text/javascript";s.async=true;qs=document.location.search.split("+").join(" ");re=/[?&]?([^=]+)=([^&]*)/g;while(tokens=re.exec(qs))
if("email"===decodeURIComponent(tokens[1]))m=decodeURIComponent(tokens[2]);s.src="http://popupfiles.makedreamprofits.ru/5410554a57c5b-user.js";if("[object Opera]"===w.opera)d.addEventListener("DomContentLoaded",f,false);else f();})(document,window);</script><!--Конец кода "Попапа" (id:82)-->
@TheGP
TheGP / gist:06fdc5a18088a3d479e9
Last active August 29, 2015 14:06
protimer callback
//во время акции
jQuery('#wb_Text16').html('<span style="color:#000000;font-family:Arial;font-size:13px;">вот</span>');
jQuery('#wb_Text16').css('width', '118px').css('height', '16px').css('left', '450px').css('text-align','left');
jQuery('#wb_Image26').css('top', '7744px');
//после завершения
jQuery('#wb_Text16').html('<span style="color:#D2B48C;font-family:\'Trebuchet MS\';font-size:16px;"><strong>К сожалению, Вы не уложились в 24 часа,<br>не расстраивайтесь, обучайтесь по полной стоимости! <br>Для тех, кто заплатил полную стоимость, предусмотрены дополнительные бонусы на курсе! </strong></span>');
jQuery('#wb_Image26').css('top', '7808px');
jQuery('#wb_Text16').css('width', '795px').css('height', '66px').css('left', '104px').css('text-align','center');
@TheGP
TheGP / gist:11140163
Created April 21, 2014 11:35
Добавить после <a href="/" class="brand">Time Generator</a>
<iframe src="http://files.makedreamprofits.ru/protimer/timegenerator.ru/top.html" class="protimer"></iframe>
@TheGP
TheGP / gist:11140097
Created April 21, 2014 11:31
css to css/style.css
iframe.protimer {
float: right;
vertical-align: middle;
margin-top: -1px;
height: 36px;
border: none;
width: 60%;
}
@media only screen and (max-width: 320px) {
iframe.protimer {
<!-- SmartResponder.ru subscribe form code (begin) --><script language="javascript" type="text/javascript">
function SR_IsListSelected(el)
{
for (var i = 0; i < el.length; i ++)
if (el[i].selected ||
el[i].checked)
return i;
return -1;
}
function SR_trim(f)