Skip to content

Instantly share code, notes, and snippets.

View singerxt's full-sized avatar
🙃
Trying to be Rustacean ;-)

Mateusz Śpiewak singerxt

🙃
Trying to be Rustacean ;-)
View GitHub Profile
/* USE CASE WHEN WE HAVE 2 ADS IN ONE PAGE */
<div class="ad1">
<form data-dw="300" data-dh="90" data-dslid="300x60_1" data-tw="300" data-th="60" data-tslid="300x60_1"
data-mw="300" data-mh="60" data-nslid="300x600_1"></form>
</div>
<div class="ad2">
<form data-dw="790" data-dh="90" data-dslid="790x90_1" data-tw="790" data-th="90" data-tslid="790x90_1"
data-mw="300" data-mh="60" data-nslid="300x60_2"></form> //important see 300x60_2 (_2 is ad position and is another the for other breakpoints)
</div>
.lazy-image {
width: auto;
height: auto;
position: relative;
}
@-webkit-keyframes loaded {
0% {
opacity: 0;
}
//Someone tried to combine first and third rotator using css classes
// Because now featured rotator is now between first and third rotator looks broken.
// this is happening only on mobile
//first rotator
<div class="playlist-node">
<div class="title">Title</div>
<div class="rotator" style="display: none!important"></div>
</div>
(function ($) {
'use strict';
Drupal.behaviors.sweep = {
attach: function (context,settings) {
alert(Yo!);
}
};
})(jQuery);
var Person = function (first, last) {
this.firstName = first;
this.lastName = last;
};
Object.defineProperty(Person, 'species', {
writable: false,
value: 'human'
});
var Person = function (first, last) {
this.firstName = first;
this.lastName = last;
}
Object.defineProperty(Person, 'species', {
writable: false,
value: 'human'
});
var woman = new Person('Kate', 'Khowalski');
woman.firstName; // 'Kate'
woman.lastName; // 'Khowalski'
woman.fullName; //'Kate Khowalski
woman.species; // human
/*
* Change firstName
*/
@singerxt
singerxt / profile.js
Created February 19, 2015 18:50
profile page
/**
* Gigya Profile Module
*
* 'use strict';
* // variables to be ignored by JSHint'
*
* define([optional dependencies], function(dependencies reference in the same order) {
* // You can return any type of objects, functions or variables
* return {
* foo: function() {...}
@singerxt
singerxt / gigyaPatch.js
Created February 19, 2015 18:46
gigya patch
/**
* Gigya Patch Module
*
* 'use strict';
* // variables to be ignored by JSHint'
*
* define([optional dependencies], function(dependencies reference in the same order) {
* // You can return any type of objects, functions or variables
* return {
* foo: function() {...}
FOR SHARE BUTTON
<div class="social-share">
<span>share</span>
<ul>
<li class="facebook"><a href="{{url for share}}">facebook</a></li>
<li class="twitter"><a href="{{url for share}}">twitter</a></li>
<li class="google"><a href="{{url for share}}">google</a></li>
<li class="pinterest"><a href="{{url for share}}">pinterest</a></li>
<li class="tumlbr"><a href="{{url for share}}">tumblr</a></A></li>