C# Class BlogEngine.Core.Web.Scripting.Helpers

Helper methods for script manipulations
Show file Open project: rasmuskl/ReSharperCourse

Public Methods

Method Description
AddBundledStylesAndScripts ( System page ) : void

Add bundles created by web.optimization

AddCustomCodeToHead ( System page ) : void

Adds code to the HTML head section.

AddGenericLink ( System page, string type, string relation, string title, string href ) : void

Add generic lit to the page

AddScript ( System page, string src, bool top = true, bool defer = false, bool asnc = false ) : void

Add javascript to page

AddStyle ( System page, string lnk ) : void

Add stylesheet to page header

AddTrackingScript ( System page ) : void

Adds a JavaScript to the bottom of the page at runtime.

You must add the script tags to the BlogSettings.Instance.TrackingScript.

FormatInlineScript ( string script ) : string

Format inline script

Method Details

AddBundledStylesAndScripts() public static method

Add bundles created by web.optimization
public static AddBundledStylesAndScripts ( System page ) : void
page System Base page
return void

AddCustomCodeToHead() public static method

Adds code to the HTML head section.
public static AddCustomCodeToHead ( System page ) : void
page System
return void

AddGenericLink() public static method

Add generic lit to the page
public static AddGenericLink ( System page, string type, string relation, string title, string href ) : void
page System Page
type string Type
relation string Relation
title string Title
href string Url
return void

AddScript() public static method

Add javascript to page
public static AddScript ( System page, string src, bool top = true, bool defer = false, bool asnc = false ) : void
page System Page
src string Source
top bool If add to page header
defer bool Defer
asnc bool Async
return void

AddStyle() public static method

Add stylesheet to page header
public static AddStyle ( System page, string lnk ) : void
page System Page
lnk string Href link
return void

AddTrackingScript() public static method

Adds a JavaScript to the bottom of the page at runtime.
You must add the script tags to the BlogSettings.Instance.TrackingScript.
public static AddTrackingScript ( System page ) : void
page System
return void

FormatInlineScript() public static method

Format inline script
public static FormatInlineScript ( string script ) : string
script string JavaScript code
return string