Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should be able to specify base css path for locations #6

Closed
inovationfactory opened this issue Sep 21, 2013 · 2 comments
Closed

Should be able to specify base css path for locations #6

inovationfactory opened this issue Sep 21, 2013 · 2 comments

Comments

@inovationfactory
Copy link

I hacked it like so but should be in the config

/* Locations */

  // Registers a location element
  // Args: string id (Location ID), DOMHTMLElement object (Location element)
  registerLocation: function(id, object) {

    if (id == 'head')
      object._skel_attach = function(x) {
        // Here is the monkey patch
        if( x.href ) {
          x.href = x.href.replace("/css/","/assets/");
        }    
        this.insertBefore( x, _.me );
      };   
    else
      object._skel_attach = function(x) {
        this.appendChild( x ); 
      };

    _.locations[id] = object;

  }, 

What do you think? By the way I really like skeljs thank you!

@ajlkn
Copy link
Owner

ajlkn commented Sep 21, 2013

You can do this already using the "prefix" config option.

On Sep 20, 2013, at 7:03 PM, inovationfactory notifications@github.com wrote:

I hacked it like so but should be in the config

/* Locations */

// Registers a location element
// Args: string id (Location ID), DOMHTMLElement object (Location element)
registerLocation: function(id, object) {

if (id == 'head')
  object._skel_attach = function(x) {
    // Here is the monkey patch
    if( x.href ) {
      x.href = x.href.replace("/css/","/assets/");
    }    
    this.insertBefore( x, _.me );
  };   
else
  object._skel_attach = function(x) {
    this.appendChild( x ); 
  };

_.locations[id] = object;

},
What do you think? By the way I really like skeljs thank you!


Reply to this email directly or view it on GitHub.

@inovationfactory
Copy link
Author

My bad missed that thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants