Skip to content

Instantly share code, notes, and snippets.

@rqx110
rqx110 / CssRewriteUrlTransformFixed.cs
Created December 5, 2014 01:18
CssRewriteUrlTransformFixed.cs
namespace System.Web.Optimization
{
using System.Text.RegularExpressions;
/// <summary>
/// Fix for the standard System.Web.Optimization.CssRewriteUrlTransform which doesn't play nice with data URIs.
/// I've logged the bug on codeplex, but this will have to do for now: https://aspnetoptimization.codeplex.com/workitem/88
/// </summary>
public class CssRewriteUrlTransformFixed : IItemTransform
{
//** jQuery Scroll to Top Control script- (c) Dynamic Drive DHTML code library: http://www.dynamicdrive.com.
//** Available/ usage terms at http://www.dynamicdrive.com (March 30th, 09')
//** v1.1 (April 7th, 09'):
//** 1) Adds ability to scroll to an absolute position (from top of page) or specific element on the page instead.
//** 2) Fixes scroll animation not working in Opera.
var scrolltotop={
//startline: Integer. Number of pixels from top of doc scrollbar is scrolled before showing control
//scrollto: Keyword (Integer, or "Scroll_to_Element_ID"). How far to scroll document up when control is clicked on (0=top).
/**
* Show or hide the button depending on the scroll position.
*/
function animateButton() {
var button = $('#back-to-top');
var scrollPosition = $(window).scrollTop();
if (scrollPosition > 400) {
button.fadeIn();
} else {
button.fadeOut();
namespace System.Web.Mvc
{
#region Using
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc.Html;
using System.ComponentModel;
using System.Linq.Expressions;