Skip to content

Commit

Permalink
Remove jQuery script injection
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Kwok committed Jul 17, 2015
1 parent 2453d54 commit 59d5a31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
3 changes: 0 additions & 3 deletions filenames/filenames.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ var (
PublicFilepath = filepath.Join(ExecutablePath, "built-in", "public")
HbsFilepath = filepath.Join(ExecutablePath, "built-in", "hbs")

// For handlebars (this is a url string)
JqueryFilename = "/public/jquery/jquery.min.js"

// For blog (this is a url string)
// TODO: This is not used at the moment because it is still hard-coded into the create database string
DefaultBlogLogoFilename = "/public/images/blog-logo.jpg"
Expand Down
7 changes: 2 additions & 5 deletions templates/handlebars.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ import (
"time"
)

// Ghost always includes a link to jquery in it's footer func. Mimic this.
var jqueryCodeForFooter = []byte("<script src=\"" + filenames.JqueryFilename + "\"></script>")

// Helper fuctions
func nullFunc(helper *structure.Helper, values *structure.RequestData) []byte {
// Check if the helper was defined in a plugin
Expand Down Expand Up @@ -369,8 +366,8 @@ func ghost_headFunc(helper *structure.Helper, values *structure.RequestData) []b
}

func ghost_footFunc(helper *structure.Helper, values *structure.RequestData) []byte {
// TODO: This seems to just output a jquery link in ghost. Keep for compatibility?
return jqueryCodeForFooter
// TODO: customized code injection
return []byte{}
}

func meta_titleFunc(helper *structure.Helper, values *structure.RequestData) []byte {
Expand Down

0 comments on commit 59d5a31

Please sign in to comment.