Skip to content

Commit

Permalink
#27 Adding skeleton of comic bookmarking system
Browse files Browse the repository at this point in the history
  • Loading branch information
jesgs authored and ardathksheyna committed Jul 23, 2017
1 parent b7489f2 commit 189663f
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
39 changes: 39 additions & 0 deletions assets/js/bookmark.js
@@ -0,0 +1,39 @@
(function ($) {
if (typeof(localStorage) != 'object') {
console.log('Browser does not support LocalStorage');
return;
}

$(function() {
BookMark.init();
// KISS
$('#bookmark-comic').on('click', function (e) {

});

$('#show-comic-bookmark-history').on('click', function (e) {

});

});

var BookMark = {
storage : null,

init: function() {
this.storage = localStorage;
},

bookmark : function() {

},

history : function() {

},

goto : function() {

}
};
}(jQuery));
Empty file modified includes/pages/options.php
100644 → 100755
Empty file.
25 changes: 25 additions & 0 deletions mangapress.php
Expand Up @@ -289,6 +289,8 @@ private function _load_current_options()
add_action('wp_enqueue_scripts', array($this, 'wp_enqueue_scripts'));
}

add_action('wp_enqueue_scripts', array($this, 'wp_enqueue_other_scripts'));

/*
* Comic Page size
*/
Expand Down Expand Up @@ -327,9 +329,32 @@ public function wp_enqueue_scripts()
'screen'
);

wp_register_script(
'mangapress-bookmark',
// plugins_url( '/assets/js/bookmark.js', __FILE__ ),
MP_URLPATH . 'assets/js/bookmark.js',
array('jquery'),
MP_VERSION,
true
);

wp_enqueue_style('mangapress-nav');
}

public function wp_enqueue_other_scripts()
{
wp_register_script(
'mangapress-bookmark',
plugins_url( '/assets/js/bookmark.js', __FILE__ ),
// MP_URLPATH . 'assets/js/bookmark.js',
array('jquery'),
MP_VERSION,
true
);

wp_enqueue_script('mangapress-bookmark');
}


/**
* Enqueue admin-related styles
Expand Down

0 comments on commit 189663f

Please sign in to comment.