Giter Site home page Giter Site logo

urianchor's Introduction

Welcome to my GitHub Profile

Michael Mikowski Github Stats

urianchor's People

Contributors

aisera-mikowski avatar chrisrohr avatar gogoge avatar mmikowski avatar snapadmin avatar zhangyaowu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

urianchor's Issues

Can uriAnchor.setAnchor ignore missing arguments?

Is it possible to update some but not all of the key/values via setAnchor? For example if I have a fragment like so:
#!page=profile&subpage=one&subsubpage=two
and I only want to change the the "subpage" value. I see that if I use setAnchor like so:

$.uriAnchor.setAnchor({
    subpage : 'three'
});

The hash is updated to this:
#!subpage=three

I realize I could capture the existing key values via makeAnchor and then insert them into setAnchor but that's a lot of argument management which I hope to avoid.

syntax error in sample code

There is a syntax error in the following code from
README.md, in the line beginning "online":

$uriAnchor.configModule({
  schema_map : {
    page    : { profile : true, pdf : true },
    _page   : {
      uname   : true,
      online  : { 'today','yesterday','earlier' }
    },
    slider  : { confirm : 'deny' },
    _slider : { text : 'goodbye' },
    color   : { red : true, green : true, blue : true }
  }
});

Push state support

Hi @mmikowski

I'd like to know what'd be the timeline for push state support for urianchor library or if there's any plan to add it in the future at all?

Thanks

Feature

Is there a way to partially update the url ? in this plugin

independent values without dependent values will also be returned

my English is poor.
i run the following command

$.uriAnchor.setAnchor({
  page : 'profile',
  _page : {
    uname   : 'wendy',
    online  : 'true'
  },
  slider  : 'confirm',
  _slider : {
   text   : 'hello',
   pretty : false
  },
  color : 'red'
});

but in my firefox 37 and chrome 41, _s_color is also returned? is this a bug?

snapshot2
snapshot3

Listener

Do you recommend a listener to use in conjunction?

Setting empty anchor map causes page to reload

Lines 363-365 in jquery.uriAnchor.js:

uri_string = anchor_string
        ? uri_array[0] + '#!' + anchor_string : uri_array[0]
        ;

cause the page to be reloaded when the anchorMap passed in has all parameters removed, because line 378,

document.location.href = uri_string;

will then set document href to uri_array[0], which will not have a '#!'.

One fix would be to replace lines 363-365 with something like

uri_string = uri_array[0] + '#!' + (anchor_string ?  anchor_string : "");

which will leave the hashbang in the HREF even when anchor_string is falsy.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.