Skip to content

Instantly share code, notes, and snippets.

View mkorostoff's full-sized avatar

Jersey Len mkorostoff

View GitHub Profile
@mkorostoff
mkorostoff / Fan Club Styler
Created March 13, 2012 18:46
Fan Club Styler
Drupal.behaviors.stay_classy = {
attach: function() {
//We're going to look at each views-row, some of them will get special "fan club" styles. We'll search by URL instead of class because it's all that's avaiable to us
jQuery('li.views-row')
.has('.views-field-field-blog-category a[href="/news/category/Fan-Club-News"],.fan-club-hider a[href="/forum/kid-rock-congregation"],.fan-club-hider a[href="/forum/all-summer-long-8"],.fan-club-hider a[href="/forum/krc-faqcomments"],.views-field-field-photo-category a[href="/photo/category/pro/The%20KRC%20Exclusives"],.views-field-field-photo-category a[href="/photo/category/pro/The%20KRC%20Live%20Photos"],.views-field-field-photo-category a[href="/photo/category/fan/The%20KRC%20Fan%20Photos"],.views-field-field-video-category a[href="/video/category/fan/The%20KRC%20Fan%20Videos"],.views-field-field-video-category a[href="/video/category/pro/The%20KRC%20Exclusives"]')
.addClass('fan-club-row');
}
};
//On photo and video detail pages, we move the comment box into the sidebar
//Check if we're on a video or photo node page
if (jQuery('body.node-type-photo,body.node-type-video').length) {
//If so, select #block-system-main, which contains the main page content and comment form
var comment_mover = jQuery('#block-system-main');
//And move it into the sidebar
jQuery('#block-block-91').after(comment_mover);
Drupal.behaviors.stay_classy = {
attach: function() {
//We're going to look at each views-row, some of them will get special "fan club" styles. We'll search by URL instead of class because it's all that's avaiable to us
jQuery('li.views-row')
.has('.views-field-field-blog-category a[href="/news/category/Fan-Club-News"],.fan-club-hider a[href="/forum/kid-rock-congregation"],.fan-club-hider a[href="/forum/all-summer-long-8"],.fan-club-hider a[href="/forum/krc-faqcomments"],.views-field-field-photo-category a[href="/photo/category/The%20KRC%20Exclusives"],.views-field-field-photo-category a[href="/photo/category/The%20KRC%20Live%20Photos"],.views-field-field-photo-category a[href="/photo/category/The%20KRC%20Fan%20Photos"],.views-field-field-photo-category a[href="/photo/category/The-KRC-Exclusives"],.views-field-field-photo-category a[href="/photo/category/The-KRC-Live-Photos"],.views-field-field-photo-category a[href="/photo/category/The-KRC-Fan-Photos"],.views-field-field-video-category a[href="/video/c
.alertHeader, .alertContent {
display: block;
}
.alertHeader {
display: block;
overflow: hidden;
padding: 0 0 5px;
text-transform: uppercase;
margin-bottom:15px;
@media only screen and (device-width:768px) {
#sidebar-a,#block-views-user-profile-block-3 {
margin-right:12px;
}
#block-system-main-menu,#block-block-126 {
margin-right:25px!important;
}
body {
background-size:1750px 2670px!important;
}
@mkorostoff
mkorostoff / gist:2364406
Created April 12, 2012 03:11
jquery.browser.min
(function($){$.browserTest=function(a,z){var u='unknown',x='X',m=function(r,h){for(var i=0;i<h.length;i=i+1){r=r.replace(h[i][0],h[i][1]);}return r;},c=function(i,a,b,c){var r={name:m((a.exec(i)||[u,u])[1],b)};r[r.name]=true;r.version=(c.exec(i)||[x,x,x,x])[3];if(r.name.match(/safari/)&&r.version>400){r.version='2.0';}if(r.name==='presto'){r.version=($.browser.version>9.27)?'futhark':'linear_b';}r.versionNumber=parseFloat(r.version,10)||0;r.versionX=(r.version!==x)?(r.version+'').substr(0,1):x;r.className=r.name+r.versionX;return r;};a=(a.match(/Opera|Navigator|Minefield|KHTML|Chrome/)?m(a,[[/(Firefox|MSIE|KHTML,\slike\sGecko|Konqueror)/,''],['Chrome Safari','Chrome'],['KHTML','Konqueror'],['Minefield','Firefox'],['Navigator','Netscape']]):a).toLowerCase();$.browser=$.extend((!z)?$.browser:{},c(a,/(camino|chrome|firefox|netscape|konqueror|lynx|msie|opera|safari)/,[],/(camino|chrome|firefox|netscape|netscape6|opera|version|konqueror|lynx|msie|safari)(\/|\s)([a-z0-9\.\+]*?)(\;|dev|rel|\s|$)/));$.layout=c(a,/(ge
#page > #columns {
padding: 10px 0px 0px;
/* This margin was originally set for Blackberry 8530 */
margin-top: 16em;
}
/* This rule overrides the Blackberry 8530 margin on newer smartphones */
.touch #page > #columns {
margin-top: 0;
}
var Prototype = {
Version: "1.6.1",
Browser: (function () {
var b = navigator.userAgent;
var a = Object.prototype.toString.call(window.opera) == "[object Opera]";
return {
IE: !! window.attachEvent && !a,
Opera: a,
WebKit: b.indexOf("AppleWebKit/") > -1,
Gecko: b.indexOf("Gecko") > -1 && b.indexOf("KHTML") === -1,
matt@blink8$: drush fd|grep rsn
RSN Menu rsn_menu Enabled Overridden
RSN Most Commented Articles rsn_most_commented_articles Enabled Overridden
RSN homepage rsn_homepage Enabled Overridden
RSN Footer menu rsn_footer_menu Enabled Overridden
RSN Scoreboard rsn_scoreboard Enabled Overridden
RSN Blocks and Menus rsn_blocks_and_menus Enabled Overridden
RSN Poll rsn_poll Enabled
RSN Sponsor content type rsn_sponsor_content_type Enabled
RSN Video Landing Page rsn_video_landing_page Enabled Overridden
matt@blink8: drush fd|grep rsn
RSN Menu rsn_menu Enabled
RSN Most Commented Articles rsn_most_commented_articles Enabled Overridden
RSN homepage rsn_homepage Enabled Overridden
RSN Footer menu rsn_footer_menu Enabled Overridden
RSN Scoreboard rsn_scoreboard Enabled
RSN Blocks and Menus rsn_blocks_and_menus Enabled Overridden
RSN Poll rsn_poll Enabled
RSN Sponsor content type rsn_sponsor_content_type Enabled
RSN Video Landing Page rsn_video_landing_page Enabled Overridden