Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Video speed x 2? #27277
    Alexandra
    Participant

    Personally i really like the video speed controller extension, as it goes up from 10 to 10% and i can control it from the keyboard with 2 keys
    so it’s really very convenient and allow to really fine tune the speed while you are listening

    in reply to: vanillapress 1.6.17 on firefox #27267
    Alexandra
    Participant

    it’s in chapter 1.6.17 Load Content from Local Store , in the model

    there is this function

    /**
     * Checks if local store already exists
     *
     * @return {Boolean} Boolean value for if local store already exists
     */
    model.checkLocalStore = function() {
    
      var store = model.getLocalStore();
    
      if ( null === store ) {
        return false;
      } else {
        return true;
      }
    
    }

    and then it’s used in the init

    model.init = function() {
    
      if( false === model.checkLocalStore() ) {
          model.updateLocalStore( data );
      }
    }

    But as this function is not used in other places i found that doing it like this

    model.init = function() {
    
      if( false === model.checkLocalStore() ) {
        model.updateLocalStore( data );
      }
    
    }

    much more simpler

    For the preventDefault on firefox, can you show me how the function would be, and how to make it work on all browser
    i am trying things but it doesn’t work

    I have tried return false;
    searching on google http://stackoverflow.com/questions/1367195/preventdefault-wont-work-on-firefox

    but it doesn’t work

    this is the actual function

    /**
     * Updates local storage for post or page
     *
     */
    editor.updateContent = function() {
    
      event.preventDefault();
    
      model.updateContent( editor.currentContent );
    
    };
    in reply to: is for loop better than for of ? #25770
    Alexandra
    Participant

    in the functions i have tried to put in instead of of

    view.loadBlogPosts = function () {
        var posts = model.getPosts(),
            postsMarkup = document.createDocumentFragment(),
            primaryContentEl = helpers.getPageContentEl();
        for (var post in posts) {
            postsMarkup.appendChild(view.createPostMarkup(post));
        }
        primaryContentEl.appendChild(postsMarkup);
    };

    And it doesn’t work , title and content are displayed as undefined, why ?

Viewing 3 posts - 1 through 3 (of 3 total)