PluginProbe ʕ •ᴥ•ʔ
10Web Booster – Website speed optimization, Cache & Page Speed optimizer / trunk
10Web Booster – Website speed optimization, Cache & Page Speed optimizer vtrunk
2.33.0 2.30.5 2.30.7 2.30.9 2.31.10 2.31.8 2.32.11 2.32.21 2.32.3 2.32.4 2.32.7 2.6.31 2.6.40 2.6.42 2.6.7 2.7.37 2.7.44 2.7.47 2.8.18 2.8.19 2.8.32 2.8.34 2.8.35 2.9.23 2.9.24 2.9.25 2.9.27 v2.27.4 trunk 2.0.10 2.0.11 2.0.12 2.0.13 2.0.14 2.0.15 2.0.17 2.0.18 2.0.21 2.0.22 2.0.25 2.0.26 2.0.27 2.0.3 2.0.7 2.0.9 2.10.46 2.10.65 2.10.66 2.10.68 2.11.41 2.11.42 2.11.43 2.12.15 2.12.21 2.12.22 2.12.23 2.12.26 2.13.37 2.13.40 2.13.41 2.13.42 2.13.44 2.13.45 2.13.47 2.14.49 2.14.50 2.15.18 2.17.21 2.17.23 2.18.17 2.19.44 2.19.45 2.19.46 2.19.49 2.2.12 2.2.15 2.2.16 2.2.18 2.2.8 2.20.31 2.20.32 2.20.33 2.21.11 2.21.12 2.21.16 2.21.25 2.22.32 2.23.13 2.23.15 2.23.16 2.23.18 2.24.12 2.24.14 2.24.18 2.25.14 2.26.6 2.28.10 2.28.13 2.28.14 2.28.7 2.29.1 2.29.2 2.29.3 2.3.0 2.3.1 2.3.2 2.3.3 2.30.18
tenweb-speed-optimizer / assets / js / sidebar-plugin.js
tenweb-speed-optimizer / assets / js Last commit date
gutenberg 3 years ago gutenbergComponents 3 years ago autoupdate_banner.js 3 years ago banner_main.js 3 years ago circle-progress.js 3 years ago datatables.min.js 4 years ago jquery.multi-select.js 4 years ago jquery.tagsinput.min.js 4 years ago referral_program.js 3 years ago sidebar-plugin.js 3 years ago speed.js 3 years ago two_admin.js 1 year ago two_admin_bar.js 4 years ago two_bf_countdown.js 3 years ago two_deactivate_plugin.js 3 years ago two_elementor_editor.js 2 years ago two_preview.js 3 years ago two_update_white_label.js 1 year ago two_white_label.js 2 years ago
sidebar-plugin.js
106 lines
1 import {Optimized} from "./gutenbergComponents/optimized";
2 import {Optimizing} from "./gutenbergComponents/optimizing";
3 import {NotOptimized} from "./gutenbergComponents/notOptimized";
4 import {set_scoreData} from "./gutenbergComponents/set_scoreData";
5
6 const { registerPlugin } = wp.plugins;
7 const { __ } = wp.i18n;
8 const { PluginDocumentSettingPanel, PluginSidebarMoreMenuItem, PluginSidebar } = wp.editPost;
9 const { PanelRow} = wp.components;
10 const { Fragment} = wp.element;
11
12 const BoosterSidebarPanel = () => {
13 const postType = wp.data.select('core/editor').getCurrentPostType();
14 const allowedPostTypes = ['post', 'page'];
15 if (!allowedPostTypes.includes(postType) || wp.data.select('core/editor').getCurrentPost().status != "publish") {
16 return '';
17 }
18 return(
19 <Fragment>
20 <PluginSidebarMoreMenuItem target='awp-custom-sidebar'>{__('10Web Booster', 'tenweb-speed-optimizer')}</PluginSidebarMoreMenuItem>
21 <PluginSidebar
22 title={__('10Web Booster', 'tenweb-speed-optimizer')}>
23 <BoosterPanelRow/>
24 </PluginSidebar>
25 </Fragment>
26 );
27 }
28
29 const BoosterSettingPanel = () => {
30 const postType = wp.data.select('core/editor').getCurrentPostType();
31 const allowedPostTypes = ['post', 'page'];
32 if (!allowedPostTypes.includes(postType) || wp.data.select('core/editor').getCurrentPost().status != "publish") {
33 return '';
34 }
35 return(
36 <Fragment>
37 <PluginDocumentSettingPanel
38 name="awp-custom-sidebar"
39 title={__('10Web Booster', 'tenweb-speed-optimizer')}>
40 <BoosterPanelRow />
41 </PluginDocumentSettingPanel>
42 </Fragment>
43 );
44 }
45
46 const BoosterPanelRow = () => {
47 var post_id = wp.data.select('core/editor').getCurrentPostId();
48 if ( two_speed.front_page_id == post_id ) {
49 post_id = 'front_page';
50 }
51 const metas = wp.data.select('core/editor').getCurrentPostAttribute('meta');
52 let status = 'optimized';
53 if ( two_speed.optimizing_in_progress ) {
54 status = 'optimizing';
55 } else if ( !( post_id in two_speed.critical_pages ) ) {
56 status = 'notOptimized';
57 }
58
59 if ( status == "optimized" ) {
60 let panelRow = <><PanelRow>
61 <Optimized metas={metas} post_id={post_id}/>
62 </PanelRow></>;
63 return panelRow;
64 } else if ( status == "notOptimized" ) {
65 return (
66 <PanelRow>
67 <NotOptimized post_id={post_id} />
68 </PanelRow>);
69 }
70 else {
71 let optimizingTitle = 'Optimizing...';
72 return (
73 <PanelRow>
74 <Optimizing title={optimizingTitle} />
75 </PanelRow>);
76 }
77 }
78
79
80
81 registerPlugin('booster-sidebar-panel', {
82 render: BoosterSidebarPanel,
83 icon: <svg className="two-speed-icon" xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 26 26">
84 <g id="Group_103139" data-name="Group 103139" transform="translate(0 -0.391)">
85 <path id="Path_171039" data-name="Path 171039"
86 d="M.441,38.127h0a1.445,1.445,0,0,0,2.065-.037l7.924-6.038a.131.131,0,0,0,.033-.18.126.126,0,0,0-.158-.045l-9.409,4a1.426,1.426,0,0,0-.52,2.23Z"
87 transform="translate(-0.028 -23.443)" fill="#fff"/>
88 <path id="Path_171040" data-name="Path 171040"
89 d="M5.434,48.088a1.443,1.443,0,0,1-2.063.039l0,0L.462,45.274l-.034-.029-.06-.063a1.427,1.427,0,0,1,.12-1.992,1.393,1.393,0,0,1,.4-.252L4.295,41.49,3.723,42a1.571,1.571,0,0,0-.163,2.191q.045.054.095.1l1.74,1.7a1.5,1.5,0,0,1,.039,2.1"
90 transform="translate(-0.014 -30.56)" fill="#9ea3a8"/>
91 <path id="Path_171041" data-name="Path 171041"
92 d="M69.869,43.142h0a1.445,1.445,0,0,0-2.065.037l-7.911,6.038a.131.131,0,0,0-.033.18.126.126,0,0,0,.158.045l9.4-4a1.426,1.426,0,0,0,.52-2.23Z"
93 transform="translate(-44.277 -31.469)" fill="#fff"/>
94 <path id="Path_171042" data-name="Path 171042"
95 d="M78,32.276a1.443,1.443,0,0,1,2.063-.039l0,0,2.907,2.851L83,35.12l.06.063a1.427,1.427,0,0,1-.12,1.992,1.393,1.393,0,0,1-.4.252l-3.407,1.448.572-.507a1.571,1.571,0,0,0,.163-2.191q-.045-.054-.095-.1l-1.742-1.7a1.5,1.5,0,0,1-.036-2.1"
96 transform="translate(-57.411 -23.446)" fill="#9ea3a8"/>
97 <path id="Path_171043" data-name="Path 171043"
98 d="M31.607,23.5l5.172-7.19a.126.126,0,0,0,0-.176.121.121,0,0,0-.173,0l-13.2,10.025a.131.131,0,0,0-.03.18.127.127,0,0,0,.106.055h4.143a.136.136,0,0,1,.134.139.138.138,0,0,1-.025.078L22.56,33.8a.126.126,0,0,0,0,.176.121.121,0,0,0,.173,0l13.2-10.025a.131.131,0,0,0,.03-.18.127.127,0,0,0-.106-.055H31.717a.136.136,0,0,1-.134-.139.138.138,0,0,1,.025-.078"
99 transform="translate(-16.668 -11.879)" fill="#9ea3a8"/>
100 </g>
101 </svg>
102 });
103 registerPlugin('booster-settings-panel', {
104 render: BoosterSettingPanel,
105 icon: ''
106 });