Skip to content

Instantly share code, notes, and snippets.

@arestov
arestov / gist:1543229
Created December 31, 2011 07:22
non blocking js load
(function(){
function isFileReady ( readyState ) {
// Check to see if any of the ways a file can be ready are available as properties on the file's element
return ( ! readyState || readyState == 'loaded' || readyState == 'complete' );
}
var p = document.getElementsByTagName('script'),
p = p[p.length-1];
@arestov
arestov / gist:1218877
Created September 15, 2011 09:15
toster.ru 2
$(function() {
var ep = $(".e-people");
var epa = ep.find('a');
ep.hover(function()
{
epa.fadeIn(200)
ep.data('vis', true);
}, function()
{
epa.fadeOut(200)
@arestov
arestov / gist:1218873
Created September 15, 2011 09:14
toster.ru
$(function() {
$(".e-people").hover(function()
{
$(".e-people a").fadeIn(200);
}, function()
{
$(".e-people a").fadeOut(200);
});
@arestov
arestov / test.html
Created September 6, 2011 10:01
async document.write()
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
<head>
<title>js test</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
</head>
<body>
<script type="text/javascript">
@arestov
arestov / AAA. opera bitwise operator return uncoverable to boolen numbers .txt
Created March 21, 2011 10:32
opera bitwise operator return uncoverable to boolen numbers
I use Version 11.01 Build 1190. I didnt see this bug in last beta, but can you check if this bug was fixes with knowledgeor by fortuity?
open this page
http://seesu.me/obeta#/catalog/Star+Slinger/_/Copulate
When page loaded and all xhr will be finished you will see current song, previous and next songs.
Open dragonfly and execute code bellow (replace for su.player.song_siblings function)
Then try to back to playlist and select another song. If you see prev and next song try again back to playlist and select another song.
javascript: var uid, nav = ge("nav");each(nav.childNodes, function (c, b) {
if (b.firstChild != null && b.firstChild.href.match(/mail.php/)) uid = b.firstChild.href.split("?id=")[1]
});
var stats = {},
f = [],
href2name = {},
dates = {},
times = {},
ei = 0,
eo = 0,
mime :json, 'appliaction/json'
post '/update' do
inviters = {
:yodapunk => {
:count => 0,
:link => 'http://vk.com/reg198193',
:select => true
/**
VK
Module for working with vk.com
**/
var VK = {
determineSearchMethod: function(callback){
console.log("Trying to determine search method")
xhrRequest("http://vkontakte.ru", "GET", null, function(xhr){
<script type="text/javascript">
/*<![CDATA[*/
document.write('<'+'base '+'href="'+location.protocol+'//'+location.host+'/o/'+'"/>')
/* ]]>*/
</script>
$(function(){
var logger = $('<p></p>').css('color', '#222');
var log = function(logtext){
$(document.body).append(logger.clone().text(logtext + ' '));
}
log('btapp: ' + typeof btapp)
log('btapp.events: ' + typeof btapp.events)
log('btapp.events.all(): ' + typeof btapp.events.all())
log('btapp.events.all(): ' + JSON.stringify(btapp.events.all()))
log('btapp.events.all().torrent: ' + typeof btapp.events.all().torrent);