PluginProbe ʕ •ᴥ•ʔ
WP Fastest Cache – WordPress Cache Plugin / 0.9.5
WP Fastest Cache – WordPress Cache Plugin v0.9.5
1.4.9 1.4.8 trunk 0.8.6.6 0.8.6.7 0.8.6.8 0.8.6.9 0.8.7.0 0.8.7.1 0.8.7.2 0.8.7.3 0.8.7.4 0.8.7.5 0.8.7.6 0.8.7.7 0.8.7.8 0.8.7.9 0.8.8.0 0.8.8.1 0.8.8.2 0.8.8.3 0.8.8.4 0.8.8.5 0.8.8.6 0.8.8.7 0.8.8.8 0.8.8.9 0.8.9.0 0.8.9.1 0.8.9.2 0.8.9.3 0.8.9.4 0.8.9.5 0.8.9.6 0.8.9.7 0.8.9.8 0.8.9.9 0.9.0.0 0.9.0.1 0.9.0.2 0.9.0.3 0.9.0.4 0.9.0.5 0.9.0.6 0.9.0.7 0.9.0.8 0.9.0.9 0.9.1.0 0.9.1.1 0.9.1.2 0.9.1.3 0.9.1.4 0.9.1.5 0.9.1.6 0.9.1.7 0.9.1.8 0.9.1.9 0.9.2 0.9.3 0.9.4 0.9.5 0.9.6 0.9.7 0.9.8 0.9.9 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7
wp-fastest-cache / js / toolbar.js
wp-fastest-cache / js Last commit date
cdn 4 years ago lang 6 years ago button.js 11 years ago column.js 6 years ago db.js 9 years ago dialog.js 8 years ago dialog_new.js 4 years ago index.html 11 years ago language.js 8 years ago schedule.js 11 years ago toolbar.js 5 years ago
toolbar.js
123 lines
1 var WPFC_TOOLBAR = {
2 ajax_url: false,
3 init: function(){
4 var self = this;
5
6 if(typeof ajaxurl != "undefined" || typeof wpfc_ajaxurl != "undefined"){
7 self.ajax_url = (typeof ajaxurl != "undefined") ? ajaxurl : wpfc_ajaxurl;
8 }else{
9 alert("AjaxURL has NOT been defined");
10 }
11
12 jQuery("body").append('<div id="revert-loader-toolbar"></div>');
13
14 jQuery("#wp-admin-bar-wpfc-toolbar-parent-default li").click(function(e){
15 var id = (typeof e.target.id != "undefined" && e.target.id) ? e.target.id : jQuery(e.target).parent("li").attr("id");
16 var action = "";
17
18 if(id == "wp-admin-bar-wpfc-toolbar-parent-settings"){
19 if(jQuery("div[id^='wpfc-modal-toolbarsettings-']").length === 0){
20 self.open_settings();
21 }
22 }else{
23 if(id == "wp-admin-bar-wpfc-toolbar-parent-delete-cache"){
24 action = "wpfc_delete_cache";
25 }else if(id == "wp-admin-bar-wpfc-toolbar-parent-delete-cache-and-minified"){
26 action = "wpfc_delete_cache_and_minified";
27 }else if(id == "wp-admin-bar-wpfc-toolbar-parent-clear-cache-of-this-page"){
28 action = "wpfc_delete_current_page_cache";
29 }else if(id == "wp-admin-bar-wpfc-toolbar-parent-clear-cache-of-allsites"){
30 action = "wpfc_clear_cache_of_allsites";
31 }
32
33 WPFC_TOOLBAR.send({"action": action, "path" : window.location.pathname});
34 }
35 });
36 },
37 open_settings: function(){
38 var self = this;
39
40 jQuery("#revert-loader-toolbar").show();
41 jQuery.ajax({
42 type: 'GET',
43 url: self.ajax_url,
44 data : {"action": "wpfc_toolbar_get_settings", "path" : window.location.pathname},
45 dataType : "json",
46 cache: false,
47 success: function(data){
48 if(data.success){
49 var data_json = {"action": "wpfc_toolbar_save_settings", "path" : window.location.pathname, "roles" : {}};
50
51 Wpfc_New_Dialog.dialog("wpfc-modal-toolbarsettings", {
52 close: function(){
53 Wpfc_New_Dialog.clone.remove();
54 },
55 finish: function(){
56 jQuery("#" + Wpfc_New_Dialog.id).find("input[type='checkbox']:checked").each(function(i, e){
57 data_json.roles[jQuery(e).attr("name")] = 1;
58 });
59
60 WPFC_TOOLBAR.send(data_json);
61
62 Wpfc_New_Dialog.clone.remove();
63 }}, function(dialog){
64 jQuery("#" + Wpfc_New_Dialog.id).find("input[type='checkbox']").each(function(i, e){
65 if(typeof data.roles[jQuery(e).attr("name")] != "undefined"){
66 jQuery(e).attr('checked', true);
67 }
68 });
69
70 Wpfc_New_Dialog.show_button("close");
71 Wpfc_New_Dialog.show_button("finish");
72
73 setTimeout(function(){
74 jQuery("#revert-loader-toolbar").hide();
75 }, 500);
76 });
77 }else{
78 alert("Toolbar Settings Error!")
79 }
80 }
81 });
82 },
83 send: function(data_json){
84 var self = this;
85
86 if(typeof wpfc_nonce != "undefined" && wpfc_nonce){
87 data_json.nonce = wpfc_nonce;
88 }
89
90 jQuery("#revert-loader-toolbar").show();
91 jQuery.ajax({
92 type: 'GET',
93 url: self.ajax_url,
94 data : data_json,
95 dataType : "json",
96 cache: false,
97 success: function(data){
98 if(data[1] == "error"){
99 if(typeof data[2] != "undefined" && data[2] == "alert"){
100 alert(data[0]);
101 }else{
102 Wpfc_New_Dialog.dialog("wpfc-modal-permission", {close: "default"});
103 Wpfc_New_Dialog.show_button("close");
104 }
105 }
106
107 if(typeof WpFcCacheStatics != "undefined"){
108 WpFcCacheStatics.update();
109 }else{
110 jQuery("#revert-loader-toolbar").hide();
111 }
112 }
113 });
114 }
115 };
116
117 window.addEventListener('load', function(){
118 jQuery(document).ready(function(){
119 WPFC_TOOLBAR.init();
120 });
121 });
122
123