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
// Test Data
url = 'http://your-page-adress/', //change url if you need do test another site
testCases = [
name_test_1 = {
width: 1400, //viewport width. CasperJS run test for viewport 500
height: 1000, //viewport height
selector: '#mobile-wrapper', //You can change selector if you need tests another elements
exist: false //False = this element should be notexist(eg. display:none), True = this element should be exist.
},
name_test_2 = {
@singerxt
singerxt / test.js
Last active August 29, 2015 14:07
var object = {
method: function () {
console.log('foo');
},
method2: function () {
var that = this;
$('.button').on('click', function () {
that.method();
});
.button-watch.background--light {
&:before {
background: transparent;
color: transparent;
}
&:hover {
background: inherit;
color: inherit;
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>
@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() {...}
@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() {...}
var woman = new Person('Kate', 'Khowalski');
woman.firstName; // 'Kate'
woman.lastName; // 'Khowalski'
woman.fullName; //'Kate Khowalski
woman.species; // human
/*
* Change firstName
*/
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'
});
(function ($) {
'use strict';
Drupal.behaviors.sweep = {
attach: function (context,settings) {
alert(Yo!);
}
};
})(jQuery);