Skip to content

Instantly share code, notes, and snippets.

View Morasta's full-sized avatar

Matt Viehdorfer Morasta

View GitHub Profile
@Morasta
Morasta / ie_console_fix.js
Created June 10, 2014 16:21
IE console fix
/**
* Protect window.console method calls, e.g. console is not defined on IE
* unless dev tools are open, and IE doesn't define console.debug
* Source: http://stackoverflow.com/questions/3326650/console-is-undefined-error-for-internet-explorer
*/
(function() {
if (!window.console) {
window.console = {};
}
// union of Chrome, FF, IE, and Safari console methods
@Morasta
Morasta / autolink
Created June 6, 2014 18:39
Convert plain text URLs in a string to clickable links
@Morasta
Morasta / add-om-maximenu-parentclass
Last active August 29, 2015 14:01
Drupal 7: Add class to om-maximenu parent item
$('.om-maximenu-content').hover(
function () {
$(this).parent().addClass('active-parent-li');
},
function () {
$(this).parent().removeClass('active-parent-li');
}
);
@Morasta
Morasta / d7_field_collection-feeds_integration.patch
Created April 17, 2014 19:40
Drupal 7 Field Collection Feeds Integration Patch
diff --git a/field_collection.module b/field_collection.module
index 9da8350..6610fa6 100644
--- a/field_collection.module
+++ b/field_collection.module
@@ -1142,3 +1142,87 @@ function field_collection_devel_generate($object, $field, $instance, $bundle) {
return array('value' => $field_collection->item_id);
}
+
+/**