Changeset 3202843
- Timestamp:
- 12/05/2024 08:48:58 AM (16 months ago)
- Location:
- accessibility-onetap/trunk
- Files:
-
- 9 edited
-
README.txt (modified) (3 diffs)
-
accessibility-onetap.php (modified) (2 diffs)
-
admin/class-accessibility-onetap-admin.php (modified) (1 diff)
-
admin/class-accessibility-onetap-settings-options.php (modified) (1 diff)
-
assets/js/script.js (modified) (1 diff)
-
assets/js/script.min.js (modified) (1 diff)
-
includes/class-accessibility-onetap.php (modified) (1 diff)
-
public/class-accessibility-onetap-public.php (modified) (3 diffs)
-
src/assets/js/script.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
accessibility-onetap/trunk/README.txt
r3186519 r3202843 1 === OneTap ( #1Accessibility) ===1 === OneTap (1-Click Accessibility) === 2 2 Contributors: wponetap, yukyhendiawan 3 Tags: onetap, accessibility, navigation 3 Tags: onetap, accessibility, navigation, a11y, accessibility, Alt Text, wcag, Read Page, toolbar, ada, accessibility widget, elementor accessibility, gutenberg accessibility 4 4 Requires at least: 6.6 5 5 Tested up to: 6.6 6 Stable tag: 1.1. 16 Stable tag: 1.1.2 7 7 Requires PHP: 7.4 8 8 License: GPL-2.0-or-later … … 81 81 On the left panel, click "Plugins" and select "Add New." 82 82 83 3. Search for "OneTap ( #1Accessibility)":83 3. Search for "OneTap (1-Click Accessibility)": 84 84 On the Add Plugin page, locate the search box in the top right corner. 85 Type "OneTap ( #1Accessibility)" in the search box.85 Type "OneTap (1-Click Accessibility)" in the search box. 86 86 87 87 4. Install the Plugin: 88 After finding the "OneTap ( #1Accessibility)" plugin, click the "Install Now" button below it.88 After finding the "OneTap (1-Click Accessibility)" plugin, click the "Install Now" button below it. 89 89 90 90 5. Activate the Plugin: … … 92 92 93 93 6. You're Ready to Use the Plugin: 94 After activation, navigate to the "OneTap (#1 Accessibility)" section in your WordPress dashboard to start importing and exporting menus. 94 After activation, navigate to the "OneTap (1-Click Accessibility)" section in your WordPress dashboard to start importing and exporting menus. 95 96 == Screenshots == 97 98 1. Screenshot 1. 99 2. Screenshot 2. 100 3. Screenshot 3. 101 4. Screenshot 4. 95 102 96 103 == Changelog == 104 105 = 1.1.2 = 106 * Adding (on Both Versions) a banner for Review 107 * Change Name 108 * Add Tags 109 * Add Screenshots 110 * Add 4 Languiges 97 111 98 112 = 1.1.1 = -
accessibility-onetap/trunk/accessibility-onetap.php
r3186519 r3202843 13 13 * 14 14 * @wordpress-plugin 15 * Plugin Name: OneTap ( #1Accessibility)15 * Plugin Name: OneTap (1-Click Accessibility) 16 16 * Plugin URI: https://wponetap.com 17 17 * Description: OneTap is a multilingual WordPress plugin designed for seamless website accessibility. With a simple one-click installation, it ensures your site meets accessibility standards without any hassle. Built for performance, providing an inclusive, user-friendly web environment for all visitors. 18 * Version: 1.1. 118 * Version: 1.1.2 19 19 * Author: OneTap 20 20 * Author URI: https://wponetap.com/ … … 35 35 * Rename this for your plugin and update it as you release new versions. 36 36 */ 37 define( 'ACCESSIBILITY_ONETAP_VERSION', '1.1. 1' );37 define( 'ACCESSIBILITY_ONETAP_VERSION', '1.1.2' ); 38 38 define( 'ACCESSIBILITY_ONETAP_DIR_PATH', plugin_dir_path( __FILE__ ) ); 39 39 define( 'ACCESSIBILITY_ONETAP_PLUGINS_URL', plugins_url( 'accessibility-onetap/' ) ); -
accessibility-onetap/trunk/admin/class-accessibility-onetap-admin.php
r3186519 r3202843 71 71 72 72 wp_enqueue_script( $this->plugin_name, ACCESSIBILITY_ONETAP_PLUGINS_URL . 'assets/js/admin-menu.min.js', array( 'jquery' ), $this->version, true ); 73 74 // Localize admin. 75 wp_localize_script( 76 $this->plugin_name, 77 'adminLocalize', 78 array( 79 'ajaxUrl' => admin_url( 'admin-ajax.php' ), 80 'ajaxNonce' => wp_create_nonce( 'onetap-ajax-verification' ), 81 'adminUrl' => esc_url( admin_url() ), 82 ) 83 ); 84 85 wp_enqueue_script( $this->plugin_name . '-admin-global', ACCESSIBILITY_ONETAP_PLUGINS_URL . 'assets/js/admin-global.min.js', array( 'jquery' ), $this->version, true ); 86 } 87 88 /** 89 * Display admin notice. 90 */ 91 public function display_admin_notice() { 92 $get_cookie_disable_admin_notices = isset( $_COOKIE['onetap_disable_admin_notices'] ) ? sanitize_key( $_COOKIE['onetap_disable_admin_notices'] ) : ''; 93 if ( 'disable' === $get_cookie_disable_admin_notices ) { 94 return; 95 } 96 ?> 97 <div class="notice-success notice-onetap notice is-dismissible"> 98 <div class="box"> 99 <div class="box-text"> 100 <p> 101 <?php 102 esc_html_e( 103 "Hey! 104 We’re happy that you’re using OneTap. We'd like to take this opportunity to kindly ask for a 5-star rating on WordPress.", 105 'accessibility-onetap' 106 ); 107 ?> 108 </p> 109 <strong><?php esc_html_e( 'It would mean a lot to us.', 'accessibility-onetap' ); ?></strong> 110 </div> 111 <div class="box-btn"> 112 <a class="onetap-button" href="https://wordpress.org/support/plugin/accessibility-onetap/reviews/#new-post" target="_blank"><?php esc_html_e( 'Ok, you deserve it', 'accessibility-onetap' ); ?></a> 113 <button class="outline already-did" type="button"><?php esc_html_e( 'Already did', 'accessibility-onetap' ); ?></button> 114 <a class="onetap-button outline" href="https://wponetap.com/feedback" target="_blank"><?php esc_html_e( 'No, it’s not good enough', 'accessibility-onetap' ); ?></a> 115 </div> 116 </div> 117 </div> 118 <style> 119 .notice-onetap { 120 padding: 0 !important; 121 border: none; 122 font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, Oxygen, Fira Sans, Droid Sans, sans-serif !important; 123 } 124 125 .notice-onetap .box { 126 background: #2563EB; 127 border-radius: 8px; 128 padding: 25px; 129 } 130 131 .notice-onetap .notice-dismiss:focus { 132 box-shadow: none; 133 outline: 0; 134 } 135 136 .notice-onetap .notice-dismiss::before { 137 color: #FFFFFF; 138 } 139 140 .notice-onetap .box .box-text p, 141 .notice-onetap .box .box-text strong { 142 color: #FFFFFF; 143 font-size: 16px; 144 font-weight: 400; 145 line-height: 1.5rem; 146 padding: 0; 147 margin: 0; 148 } 149 150 .notice-onetap .box .box-text strong { 151 font-weight: 600; 152 } 153 154 .notice-onetap .box .box-btn { 155 margin-top: 20px; 156 display: flex; 157 flex-wrap: wrap; 158 gap: 10px; 159 } 160 161 .notice-onetap .box .box-btn button, 162 .notice-onetap .box .box-btn a.onetap-button { 163 font-size: 0.875rem; 164 line-height: 1.25rem; 165 fill: #2563EB; 166 color: #2563EB; 167 background-color: #FFFFFF; 168 border-style: solid; 169 border-width: 1px 1px 1px 1px; 170 border-color: #FFFFFF; 171 padding: 0.625rem 0.875rem 0.625rem 0.875rem; 172 border-radius: 6px; 173 font-weight: 500; 174 display: inline-block; 175 cursor: pointer; 176 text-decoration: none; 177 } 178 179 .notice-onetap .box .box-btn button.outline, 180 .notice-onetap .box .box-btn a.outline { 181 fill: #FFFFFF; 182 color: #FFFFFF; 183 background: transparent; 184 } 185 </style> 186 <?php 187 } 188 189 /** 190 * Callback function for AJAX to dismiss admin notices and set a cookie. 191 */ 192 public function dismiss_notice_ajax_callback() { 193 // Security check: Ensure nonce is valid. 194 check_ajax_referer( 'onetap-ajax-verification', 'mynonce' ); 195 196 // Set a cookie to disable admin notices for 5 days. 197 setcookie( 'onetap_disable_admin_notices', 'disable', time() + ( 5 * 24 * 60 * 60 ) ); 198 199 // Terminate the AJAX request. 200 wp_send_json( array( 'success' => true ) ); 201 wp_die(); 73 202 } 74 203 } -
accessibility-onetap/trunk/admin/class-accessibility-onetap-settings-options.php
r3186519 r3202843 231 231 'se' => __( 'Svenska', 'accessibility-onetap' ), 232 232 'fi' => __( 'Suomi', 'accessibility-onetap' ), 233 'pt' => __( 'Português', 'accessibility-onetap' ), 234 'ro' => __( 'Română', 'accessibility-onetap' ), 235 'si' => __( 'Slovenščina', 'accessibility-onetap' ), 236 'sk' => __( 'Slovenčina', 'accessibility-onetap' ), 233 237 ), 234 238 ), -
accessibility-onetap/trunk/assets/js/script.js
r3186519 r3202843 142 142 function accessibilityOnetapUpdateContentBasedOnLanguage( language ) { 143 143 // Define a list of valid languages 144 const validLanguages = [ 'en', 'de', 'es', 'fr', 'it', 'pl', 'se', 'fi' ];144 const validLanguages = [ 'en', 'de', 'es', 'fr', 'it', 'pl', 'se', 'fi', 'pt', 'ro', 'si', 'sk' ]; 145 145 146 146 // Check if the provided language is valid -
accessibility-onetap/trunk/assets/js/script.min.js
r3186519 r3202843 1 (p=>{let e=p(".onetap-accessibility-plugin nav.onetap-accessibility.onetap-plugin-onetap .onetap-container .onetap-accessibility-settings .onetap-close");var t=p(".onetap-accessibility-plugin .onetap-container-toggle .onetap-toggle");let a=p(".onetap-accessibility-plugin .onetap-languages");p(t).click(function(){p(".onetap-accessibility-plugin .onetap-accessibility").removeClass("onetap-toggle-close"),p(".onetap-accessibility-plugin .onetap-accessibility").addClass("onetap-toggle-open"),p(e).show(100)}),p(e).click(function(){p(".onetap-accessibility-plugin .onetap-accessibility").removeClass("onetap-toggle-open"),p(".onetap-accessibility-plugin .onetap-accessibility").addClass("onetap-toggle-close"),p(e).hide(100)}),p(a).click(function(){p(this).toggleClass("onetap-active"),p(".onetap-accessibility-settings header.onetap-header-top .onetap-list-of-languages").fadeToggle(350)});var n=(t=new Date).getFullYear()+`-${String(t.getMonth()+1).padStart(2,"0")}-`+String(t.getDate()).padStart(2,"0"),o=((t=new Date(t)).setDate(t.getDate()+2),t.getFullYear()),i=String(t.getMonth()+1).padStart(2,"0"),t=String(t.getDate()).padStart(2,"0");let s={activeBorders:{biggerText:0,biggerCursor:0,readableFont:0,grayscale:0},biggerText:!1,biggerCursor:!1,grayscale:!1,readableFont:!1,readingLine:!1,highlightLinks:!1,information:{updated:"onetap-version-1",language:accessibilityOnetapAjaxObject.getSettings.language,developer:"Yuky Hendiawan",startDate:n,endDate:o+`-${i}-`+t}},r="accessibility-onetap";function c(){return JSON.parse(localStorage.getItem(r))}function l(e){["en","de","es","fr","it","pl","se","fi" ].includes(e)&&[{selector:"nav.onetap-accessibility header.onetap-header-top .onetap-languages .onetap-text span",text:(e=accessibilityOnetapAjaxObject.languages[e]).header.language},{selector:"nav.onetap-accessibility header.onetap-header-top .onetap-site-container .onetap-site-info .onetap-title h2",text:e.header.title},{selector:"nav.onetap-accessibility header.onetap-header-top .onetap-site-container .onetap-site-info .onetap-desc p span",text:e.header.desc},{selector:"nav.onetap-accessibility header.onetap-header-top .onetap-site-container .onetap-site-info .onetap-desc p a",text:e.header.anchor},{selector:"nav.onetap-accessibility .onetap-features .onetap-bigger-text .onetap-title h3",text:e.general.biggerText},{selector:"nav.onetap-accessibility .onetap-features .onetap-cursor .onetap-title h3",text:e.general.cursor},{selector:"nav.onetap-accessibility .onetap-features .onetap-readable-font .onetap-title h3",text:e.general.readableFont},{selector:"nav.onetap-accessibility .onetap-features .onetap-grayscale .onetap-title h3",text:e.colors.grayscale},{selector:"nav.onetap-accessibility .onetap-features .onetap-reading-line .onetap-title h3",text:e.navigation.readingLine},{selector:"nav.onetap-accessibility .onetap-features .onetap-highlight-links .onetap-title h3",text:e.navigation.highlightLinks},{selector:"nav.onetap-accessibility .onetap-divider-separator .onetap-colors",text:e.divider.colors},{selector:"nav.onetap-accessibility .onetap-divider-separator .onetap-navigation",text:e.divider.navigation},{selector:"nav.onetap-accessibility .onetap-accessibility-settings .onetap-reset-settings span",text:e.resetSettings},{selector:"nav.onetap-accessibility .onetap-footer-bottom .onetap-icon-list-text",text:e.footer.accessibilityStatement},{selector:"nav.onetap-accessibility footer.onetap-footer-bottom .onetap-divider-container .onetap-divider__text",text:e.footer.version}].forEach(e=>{p(e.selector).text(e.text)})}function g(e,t,a,n){p("*").not(t).each(function(){let e=p(this).attr("style")||"";0===n?e=e.replace(/font-size:\s*[^;]+;?/,""):[1,2,3].includes(n)&&(/font-size:\s*[^;]+;?/.test(e)?e=e.replace(/font-size:\s*[^;]+;?/,"font-size: "+a):e+=" font-size: "+a),e=e.trim(),p(this).attr("style",e)})}function u(e,l){if("off"!==accessibilityOnetapAjaxObject.showModules["bigger-text"]&&"biggerText"===e){let t=null,e=null,a=null,n=null,o=null,i=null,s=null;s=1===l?(t="19px !important;",e="48px !important;",a="43px !important;",n="31px !important;",o="24px !important;",i="19px !important;"):2===l?(t="22px !important;",e="56px !important;",a="50px !important;",n="36px !important;",o="28px !important;",i="22px !important;"):3===l?(t="25px !important;",e="64px !important;",a="57px !important;",n="41px !important;",o="32px !important;",i="25px !important;"):(t=null,e=null,a=null,n=null,o=null,i=null),p("*").not("h1, h2, h3, h4, h5, h6, .onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *").each(function(){let e=p(this).attr("style")||"";0===l?e=e.replace(/font-size:\s*[^;]+;?/,""):1!==l&&2!==l&&3!==l||(/font-size:\s*[^;]+;?/.test(e)?e=e.replace(/font-size:\s*[^;]+;?/,"font-size: "+t):e+=" font-size: "+t),e=e.trim(),p(this).attr("style",e)}),g(0,"h2, h3, h4, h5, h6, .onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *",e,l),g(0,"h1, h3, h4, h5, h6, .onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *",a,l),g(0,"h1, h2, h4, h5, h6, .onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *",n,l),g(0,"h1, h2, h3, h5, h6, .onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *",o,l),g(0,"h1, h2, h3, h4, h6, .onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *",i,l),g(0,"h1, h2, h3, h4, h5, .onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *",s,l)}}function d(e,t){"off"!==accessibilityOnetapAjaxObject.showModules["big-cursor"]&&"biggerCursor"===e&&(1===t?(p("html").addClass("onetap-cursor-feature1"),p("html").removeClass("onetap-cursor-feature2"),p("html").removeClass("onetap-cursor-feature3")):2===t?(p("html").removeClass("onetap-cursor-feature1"),p("html").addClass("onetap-cursor-feature2"),p("html").removeClass("onetap-cursor-feature3")):3===t?(p("html").removeClass("onetap-cursor-feature1"),p("html").removeClass("onetap-cursor-feature2"),p("html").addClass("onetap-cursor-feature3")):(p("html").removeClass("onetap-cursor-feature1"),p("html").removeClass("onetap-cursor-feature2"),p("html").removeClass("onetap-cursor-feature3")))}function h(e,t){"off"!==accessibilityOnetapAjaxObject.showModules["readable-font"]&&"readableFont"===e&&p("*").not(".onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *").each(function(){let e=p(this).attr("style")||"";t&&(/font-family:\s*[^;]+;?/.test(e)?e=e.replace(/font-family:\s*[^;]+;?/,"font-family: Roboto, sans-serif !important;"):e+=" font-family: Roboto, sans-serif !important;"),e=e.trim(),p(this).attr("style",e)})}function m(e,a){if("off"!==accessibilityOnetapAjaxObject.showModules.grayscale&&"grayscale"===e){let t=null;t=1===a?"grayscale(33%) !important;":2===a?"grayscale(66%) !important;":3===a?"grayscale(100%) !important;":null,p("html").not(".onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *").each(function(){let e=p(this).attr("style")||"";0===a?e=e.replace(/filter:\s*[^;]+;?/,""):1!==a&&2!==a&&3!==a||(/filter:\s*[^;]+;?/.test(e)?e=e.replace(/filter:\s*[^;]+;?/,"filter: "+t):e+=" filter: "+t),e=e.trim(),p(this).attr("style",e)})}}function b(e,t){"off"!==accessibilityOnetapAjaxObject.showModules["reading-line"]&&"readingLine"===e&&(t?(p(".onetap-markup-reading-line").addClass("onetap-active"),p(document).mousemove(function(e){e=e.pageY;p(".onetap-markup-reading-line").css("top",e+"px")})):p(".onetap-markup-reading-line").removeClass("onetap-active"))}function f(e,t){"off"!==accessibilityOnetapAjaxObject.showModules["highlight-links"]&&"highlightLinks"===e&&p("a").not(".onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *").each(function(){let e=p(this).attr("style")||"";t?(/background:\s*[^;]+;?/.test(e)?e=e.replace(/background:\s*[^;]+;?/,"background: #000 !important;"):e+=" background: #000 !important;",/color:\s*[^;]+;?/.test(e)?e=e.replace(/color:\s*[^;]+;?/,"color: #f7ff00 !important;"):e+=" color: #f7ff00 !important;"):e=(e=e.replace(/background:\s*[^;]+;?/,"")).replace(/color:\s*[^;]+;?/,""),e=e.trim(),p(this).attr("style",e)})}localStorage.getItem(r)?void 0!==(n=JSON.parse(localStorage.getItem(r))).information&&void 0!==n.information.updated&&"onetap-version-1"===n.information.updated||(localStorage.removeItem(r),localStorage.setItem(r,JSON.stringify(s))):localStorage.setItem(r,JSON.stringify(s)),p("nav.onetap-accessibility .onetap-accessibility-settings .onetap-languages .onetap-icon img").removeClass("onetap-active"),p('nav.onetap-accessibility .onetap-accessibility-settings .onetap-languages .onetap-icon img[alt="'+c().information.language+'"]').addClass("onetap-active"),p("nav.onetap-accessibility header.onetap-header-top .onetap-list-of-languages ul li").click(function(){var e=p(this).attr("data-language"),t=p(this).text(),t=(p("nav.onetap-accessibility .onetap-accessibility-settings .onetap-languages .onetap-icon img").removeClass("onetap-active"),p('nav.onetap-accessibility .onetap-accessibility-settings .onetap-languages .onetap-icon img[alt="'+e+'"]').addClass("onetap-active"),p(a).removeClass("onetap-active"),p("nav.onetap-accessibility header.onetap-header-top .onetap-languages .onetap-text span").text(t),l(e),p(".onetap-accessibility-settings header.onetap-header-top .onetap-list-of-languages").fadeOut(350),c());t.information.language=e,localStorage.setItem(r,JSON.stringify(t))}),l(c().information.language);let y=[{selector:".onetap-bigger-text",key:"biggerText"},{selector:".onetap-cursor",key:"biggerCursor"},{selector:".onetap-grayscale",key:"grayscale"},{selector:".onetap-readable-font",key:"readableFont"},{selector:".onetap-reading-line",key:"readingLine"},{selector:".onetap-highlight-links",key:"highlightLinks"}];function v(e,t){var a=["onetap-lv1","onetap-lv2","onetap-lv3"];e.removeClass(a.join(" ")),1<=t&&t<=3&&e.addClass(a[t-1])}function x(e){e.toggleClass("onetap-active ")}let C=0;function k(l){y.forEach(({selector:e,key:t})=>{var a,n,o,i,s,e=p("nav.onetap-accessibility.onetap-plugin-onetap .onetap-accessibility-settings "+e);e.length&&(a=!["readableFont","readingLine","highlightLinks"].includes(t),o=t,i=l,s=a,(n=e).on("click",function(){i=c(),s?(C=i.activeBorders[o]=(i.activeBorders[o]+1)%4,i[o]=0!==C,v(n,C),u(o,C),d(o,C),m(o,C)):(i[o]=!i[o],x(n,i[o]),h(o,i[o]),b(o,i[o]),f(o,i[o])),localStorage.setItem(r,JSON.stringify(i))}))})}y.forEach(({selector:e,key:t})=>{e=p("nav.onetap-accessibility.onetap-plugin-onetap .onetap-accessibility-settings "+e);e.length&&void 0!==c()[t]&&(!["readableFont","readingLine","highlightLinks"].includes(t)?void 0!==c().activeBorders[t]&&(v(e,c().activeBorders[t]),0!==c().activeBorders[t])&&(u(t,c().activeBorders[t]),d(t,c().activeBorders[t]),m(t,c().activeBorders[t])):void 0!==c()[t]&&void 0!==c()[t]&&c()[t]&&(x(e,c()[t]),h(t,c()[t]),b(t,c()[t]),f(t,c()[t])))}),k(c()),p(document).on("click","nav.onetap-accessibility.onetap-plugin-onetap .onetap-reset-settings span",function(){var e;p("nav.onetap-accessibility.onetap-plugin-onetap .onetap-box-feature").each(function(){p(this).removeClass("onetap-lv1 onetap-lv2 onetap-lv3 onetap-active")}),localStorage.getItem(r)?((e=JSON.parse(localStorage.getItem(r))).biggerText||e.biggerCursor||e.grayscale||e.readableFont||e.readingLine||e.highlightLinks||e.information.language)&&(p("nav.onetap-accessibility .onetap-accessibility-settings .onetap-languages .onetap-icon img").removeClass("onetap-active"),p('nav.onetap-accessibility .onetap-accessibility-settings .onetap-languages .onetap-icon img[alt="en"]').addClass("onetap-active"),p("nav.onetap-accessibility .onetap-accessibility-settings .onetap-languages .onetap-icon img").removeClass("onetap-active"),p('nav.onetap-accessibility .onetap-accessibility-settings .onetap-languages .onetap-icon img[alt="'+accessibilityOnetapAjaxObject.getSettings.language+'"]').addClass("onetap-active"),l(accessibilityOnetapAjaxObject.getSettings.language),localStorage.removeItem(r),localStorage.setItem(r,JSON.stringify(s)),p("*").not(".onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *").each(function(){let e=p(this).attr("style")||"";e=(e=(e=(e=(e=(e=e.replace(/font-size:\s*[^;]+;?/,"")).replace(/line-height:\s*[^;]+;?/,"")).replace(/background-size:\s*[^;]+;?/,"")).replace(/visibility:\s*[^;]+;?/,"")).replace(/font-family:\s*[^;]+;?/,"")).trim(),p(this).attr("style",e)}),p("a").not(".onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *").each(function(){let e=p(this).attr("style")||"";e=(e=(e=e.replace(/background:\s*[^;]+;?/,"")).replace(/color:\s*[^;]+;?/,"")).trim(),p(this).attr("style",e)}),p("img").not(".onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *").each(function(){let e=p(this).attr("style")||"";e=(e=e.replace(/visibility:\s*[^;]+;?/,"")).trim(),p(this).attr("style",e)}),p("html").removeClass("onetap-cursor-feature1"),p("html").removeClass("onetap-cursor-feature2"),p("html").removeClass("onetap-cursor-feature3"),p("html, img").not(".onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *").each(function(){let e=p(this).attr("style")||"";e=(e=e.replace(/filter:\s*[^;]+;?/,"")).trim(),p(this).attr("style",e)}),p(".onetap-markup-reading-line").removeClass("onetap-active"),p(".onetap-markup-reading-mask").removeClass("onetap-active")):localStorage.setItem(r,JSON.stringify(s))})})(jQuery);1 (p=>{let e=p(".onetap-accessibility-plugin nav.onetap-accessibility.onetap-plugin-onetap .onetap-container .onetap-accessibility-settings .onetap-close");var t=p(".onetap-accessibility-plugin .onetap-container-toggle .onetap-toggle");let a=p(".onetap-accessibility-plugin .onetap-languages");p(t).click(function(){p(".onetap-accessibility-plugin .onetap-accessibility").removeClass("onetap-toggle-close"),p(".onetap-accessibility-plugin .onetap-accessibility").addClass("onetap-toggle-open"),p(e).show(100)}),p(e).click(function(){p(".onetap-accessibility-plugin .onetap-accessibility").removeClass("onetap-toggle-open"),p(".onetap-accessibility-plugin .onetap-accessibility").addClass("onetap-toggle-close"),p(e).hide(100)}),p(a).click(function(){p(this).toggleClass("onetap-active"),p(".onetap-accessibility-settings header.onetap-header-top .onetap-list-of-languages").fadeToggle(350)});var n=(t=new Date).getFullYear()+`-${String(t.getMonth()+1).padStart(2,"0")}-`+String(t.getDate()).padStart(2,"0"),o=((t=new Date(t)).setDate(t.getDate()+2),t.getFullYear()),i=String(t.getMonth()+1).padStart(2,"0"),t=String(t.getDate()).padStart(2,"0");let s={activeBorders:{biggerText:0,biggerCursor:0,readableFont:0,grayscale:0},biggerText:!1,biggerCursor:!1,grayscale:!1,readableFont:!1,readingLine:!1,highlightLinks:!1,information:{updated:"onetap-version-1",language:accessibilityOnetapAjaxObject.getSettings.language,developer:"Yuky Hendiawan",startDate:n,endDate:o+`-${i}-`+t}},r="accessibility-onetap";function c(){return JSON.parse(localStorage.getItem(r))}function l(e){["en","de","es","fr","it","pl","se","fi","pt","ro","si","sk"].includes(e)&&[{selector:"nav.onetap-accessibility header.onetap-header-top .onetap-languages .onetap-text span",text:(e=accessibilityOnetapAjaxObject.languages[e]).header.language},{selector:"nav.onetap-accessibility header.onetap-header-top .onetap-site-container .onetap-site-info .onetap-title h2",text:e.header.title},{selector:"nav.onetap-accessibility header.onetap-header-top .onetap-site-container .onetap-site-info .onetap-desc p span",text:e.header.desc},{selector:"nav.onetap-accessibility header.onetap-header-top .onetap-site-container .onetap-site-info .onetap-desc p a",text:e.header.anchor},{selector:"nav.onetap-accessibility .onetap-features .onetap-bigger-text .onetap-title h3",text:e.general.biggerText},{selector:"nav.onetap-accessibility .onetap-features .onetap-cursor .onetap-title h3",text:e.general.cursor},{selector:"nav.onetap-accessibility .onetap-features .onetap-readable-font .onetap-title h3",text:e.general.readableFont},{selector:"nav.onetap-accessibility .onetap-features .onetap-grayscale .onetap-title h3",text:e.colors.grayscale},{selector:"nav.onetap-accessibility .onetap-features .onetap-reading-line .onetap-title h3",text:e.navigation.readingLine},{selector:"nav.onetap-accessibility .onetap-features .onetap-highlight-links .onetap-title h3",text:e.navigation.highlightLinks},{selector:"nav.onetap-accessibility .onetap-divider-separator .onetap-colors",text:e.divider.colors},{selector:"nav.onetap-accessibility .onetap-divider-separator .onetap-navigation",text:e.divider.navigation},{selector:"nav.onetap-accessibility .onetap-accessibility-settings .onetap-reset-settings span",text:e.resetSettings},{selector:"nav.onetap-accessibility .onetap-footer-bottom .onetap-icon-list-text",text:e.footer.accessibilityStatement},{selector:"nav.onetap-accessibility footer.onetap-footer-bottom .onetap-divider-container .onetap-divider__text",text:e.footer.version}].forEach(e=>{p(e.selector).text(e.text)})}function g(e,t,a,n){p("*").not(t).each(function(){let e=p(this).attr("style")||"";0===n?e=e.replace(/font-size:\s*[^;]+;?/,""):[1,2,3].includes(n)&&(/font-size:\s*[^;]+;?/.test(e)?e=e.replace(/font-size:\s*[^;]+;?/,"font-size: "+a):e+=" font-size: "+a),e=e.trim(),p(this).attr("style",e)})}function u(e,l){if("off"!==accessibilityOnetapAjaxObject.showModules["bigger-text"]&&"biggerText"===e){let t=null,e=null,a=null,n=null,o=null,i=null,s=null;s=1===l?(t="19px !important;",e="48px !important;",a="43px !important;",n="31px !important;",o="24px !important;",i="19px !important;"):2===l?(t="22px !important;",e="56px !important;",a="50px !important;",n="36px !important;",o="28px !important;",i="22px !important;"):3===l?(t="25px !important;",e="64px !important;",a="57px !important;",n="41px !important;",o="32px !important;",i="25px !important;"):(t=null,e=null,a=null,n=null,o=null,i=null),p("*").not("h1, h2, h3, h4, h5, h6, .onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *").each(function(){let e=p(this).attr("style")||"";0===l?e=e.replace(/font-size:\s*[^;]+;?/,""):1!==l&&2!==l&&3!==l||(/font-size:\s*[^;]+;?/.test(e)?e=e.replace(/font-size:\s*[^;]+;?/,"font-size: "+t):e+=" font-size: "+t),e=e.trim(),p(this).attr("style",e)}),g(0,"h2, h3, h4, h5, h6, .onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *",e,l),g(0,"h1, h3, h4, h5, h6, .onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *",a,l),g(0,"h1, h2, h4, h5, h6, .onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *",n,l),g(0,"h1, h2, h3, h5, h6, .onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *",o,l),g(0,"h1, h2, h3, h4, h6, .onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *",i,l),g(0,"h1, h2, h3, h4, h5, .onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *",s,l)}}function d(e,t){"off"!==accessibilityOnetapAjaxObject.showModules["big-cursor"]&&"biggerCursor"===e&&(1===t?(p("html").addClass("onetap-cursor-feature1"),p("html").removeClass("onetap-cursor-feature2"),p("html").removeClass("onetap-cursor-feature3")):2===t?(p("html").removeClass("onetap-cursor-feature1"),p("html").addClass("onetap-cursor-feature2"),p("html").removeClass("onetap-cursor-feature3")):3===t?(p("html").removeClass("onetap-cursor-feature1"),p("html").removeClass("onetap-cursor-feature2"),p("html").addClass("onetap-cursor-feature3")):(p("html").removeClass("onetap-cursor-feature1"),p("html").removeClass("onetap-cursor-feature2"),p("html").removeClass("onetap-cursor-feature3")))}function h(e,t){"off"!==accessibilityOnetapAjaxObject.showModules["readable-font"]&&"readableFont"===e&&p("*").not(".onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *").each(function(){let e=p(this).attr("style")||"";t&&(/font-family:\s*[^;]+;?/.test(e)?e=e.replace(/font-family:\s*[^;]+;?/,"font-family: Roboto, sans-serif !important;"):e+=" font-family: Roboto, sans-serif !important;"),e=e.trim(),p(this).attr("style",e)})}function m(e,a){if("off"!==accessibilityOnetapAjaxObject.showModules.grayscale&&"grayscale"===e){let t=null;t=1===a?"grayscale(33%) !important;":2===a?"grayscale(66%) !important;":3===a?"grayscale(100%) !important;":null,p("html").not(".onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *").each(function(){let e=p(this).attr("style")||"";0===a?e=e.replace(/filter:\s*[^;]+;?/,""):1!==a&&2!==a&&3!==a||(/filter:\s*[^;]+;?/.test(e)?e=e.replace(/filter:\s*[^;]+;?/,"filter: "+t):e+=" filter: "+t),e=e.trim(),p(this).attr("style",e)})}}function b(e,t){"off"!==accessibilityOnetapAjaxObject.showModules["reading-line"]&&"readingLine"===e&&(t?(p(".onetap-markup-reading-line").addClass("onetap-active"),p(document).mousemove(function(e){e=e.pageY;p(".onetap-markup-reading-line").css("top",e+"px")})):p(".onetap-markup-reading-line").removeClass("onetap-active"))}function f(e,t){"off"!==accessibilityOnetapAjaxObject.showModules["highlight-links"]&&"highlightLinks"===e&&p("a").not(".onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *").each(function(){let e=p(this).attr("style")||"";t?(/background:\s*[^;]+;?/.test(e)?e=e.replace(/background:\s*[^;]+;?/,"background: #000 !important;"):e+=" background: #000 !important;",/color:\s*[^;]+;?/.test(e)?e=e.replace(/color:\s*[^;]+;?/,"color: #f7ff00 !important;"):e+=" color: #f7ff00 !important;"):e=(e=e.replace(/background:\s*[^;]+;?/,"")).replace(/color:\s*[^;]+;?/,""),e=e.trim(),p(this).attr("style",e)})}localStorage.getItem(r)?void 0!==(n=JSON.parse(localStorage.getItem(r))).information&&void 0!==n.information.updated&&"onetap-version-1"===n.information.updated||(localStorage.removeItem(r),localStorage.setItem(r,JSON.stringify(s))):localStorage.setItem(r,JSON.stringify(s)),p("nav.onetap-accessibility .onetap-accessibility-settings .onetap-languages .onetap-icon img").removeClass("onetap-active"),p('nav.onetap-accessibility .onetap-accessibility-settings .onetap-languages .onetap-icon img[alt="'+c().information.language+'"]').addClass("onetap-active"),p("nav.onetap-accessibility header.onetap-header-top .onetap-list-of-languages ul li").click(function(){var e=p(this).attr("data-language"),t=p(this).text(),t=(p("nav.onetap-accessibility .onetap-accessibility-settings .onetap-languages .onetap-icon img").removeClass("onetap-active"),p('nav.onetap-accessibility .onetap-accessibility-settings .onetap-languages .onetap-icon img[alt="'+e+'"]').addClass("onetap-active"),p(a).removeClass("onetap-active"),p("nav.onetap-accessibility header.onetap-header-top .onetap-languages .onetap-text span").text(t),l(e),p(".onetap-accessibility-settings header.onetap-header-top .onetap-list-of-languages").fadeOut(350),c());t.information.language=e,localStorage.setItem(r,JSON.stringify(t))}),l(c().information.language);let y=[{selector:".onetap-bigger-text",key:"biggerText"},{selector:".onetap-cursor",key:"biggerCursor"},{selector:".onetap-grayscale",key:"grayscale"},{selector:".onetap-readable-font",key:"readableFont"},{selector:".onetap-reading-line",key:"readingLine"},{selector:".onetap-highlight-links",key:"highlightLinks"}];function v(e,t){var a=["onetap-lv1","onetap-lv2","onetap-lv3"];e.removeClass(a.join(" ")),1<=t&&t<=3&&e.addClass(a[t-1])}function x(e){e.toggleClass("onetap-active ")}let C=0;function k(l){y.forEach(({selector:e,key:t})=>{var a,n,o,i,s,e=p("nav.onetap-accessibility.onetap-plugin-onetap .onetap-accessibility-settings "+e);e.length&&(a=!["readableFont","readingLine","highlightLinks"].includes(t),o=t,i=l,s=a,(n=e).on("click",function(){i=c(),s?(C=i.activeBorders[o]=(i.activeBorders[o]+1)%4,i[o]=0!==C,v(n,C),u(o,C),d(o,C),m(o,C)):(i[o]=!i[o],x(n,i[o]),h(o,i[o]),b(o,i[o]),f(o,i[o])),localStorage.setItem(r,JSON.stringify(i))}))})}y.forEach(({selector:e,key:t})=>{e=p("nav.onetap-accessibility.onetap-plugin-onetap .onetap-accessibility-settings "+e);e.length&&void 0!==c()[t]&&(!["readableFont","readingLine","highlightLinks"].includes(t)?void 0!==c().activeBorders[t]&&(v(e,c().activeBorders[t]),0!==c().activeBorders[t])&&(u(t,c().activeBorders[t]),d(t,c().activeBorders[t]),m(t,c().activeBorders[t])):void 0!==c()[t]&&void 0!==c()[t]&&c()[t]&&(x(e,c()[t]),h(t,c()[t]),b(t,c()[t]),f(t,c()[t])))}),k(c()),p(document).on("click","nav.onetap-accessibility.onetap-plugin-onetap .onetap-reset-settings span",function(){var e;p("nav.onetap-accessibility.onetap-plugin-onetap .onetap-box-feature").each(function(){p(this).removeClass("onetap-lv1 onetap-lv2 onetap-lv3 onetap-active")}),localStorage.getItem(r)?((e=JSON.parse(localStorage.getItem(r))).biggerText||e.biggerCursor||e.grayscale||e.readableFont||e.readingLine||e.highlightLinks||e.information.language)&&(p("nav.onetap-accessibility .onetap-accessibility-settings .onetap-languages .onetap-icon img").removeClass("onetap-active"),p('nav.onetap-accessibility .onetap-accessibility-settings .onetap-languages .onetap-icon img[alt="en"]').addClass("onetap-active"),p("nav.onetap-accessibility .onetap-accessibility-settings .onetap-languages .onetap-icon img").removeClass("onetap-active"),p('nav.onetap-accessibility .onetap-accessibility-settings .onetap-languages .onetap-icon img[alt="'+accessibilityOnetapAjaxObject.getSettings.language+'"]').addClass("onetap-active"),l(accessibilityOnetapAjaxObject.getSettings.language),localStorage.removeItem(r),localStorage.setItem(r,JSON.stringify(s)),p("*").not(".onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *").each(function(){let e=p(this).attr("style")||"";e=(e=(e=(e=(e=(e=e.replace(/font-size:\s*[^;]+;?/,"")).replace(/line-height:\s*[^;]+;?/,"")).replace(/background-size:\s*[^;]+;?/,"")).replace(/visibility:\s*[^;]+;?/,"")).replace(/font-family:\s*[^;]+;?/,"")).trim(),p(this).attr("style",e)}),p("a").not(".onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *").each(function(){let e=p(this).attr("style")||"";e=(e=(e=e.replace(/background:\s*[^;]+;?/,"")).replace(/color:\s*[^;]+;?/,"")).trim(),p(this).attr("style",e)}),p("img").not(".onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *").each(function(){let e=p(this).attr("style")||"";e=(e=e.replace(/visibility:\s*[^;]+;?/,"")).trim(),p(this).attr("style",e)}),p("html").removeClass("onetap-cursor-feature1"),p("html").removeClass("onetap-cursor-feature2"),p("html").removeClass("onetap-cursor-feature3"),p("html, img").not(".onetap-plugin-onetap, .onetap-plugin-onetap *, .onetap-toggle, .onetap-toggle *, #wpadminbar, #wpadminbar *").each(function(){let e=p(this).attr("style")||"";e=(e=e.replace(/filter:\s*[^;]+;?/,"")).trim(),p(this).attr("style",e)}),p(".onetap-markup-reading-line").removeClass("onetap-active"),p(".onetap-markup-reading-mask").removeClass("onetap-active")):localStorage.setItem(r,JSON.stringify(s))})})(jQuery); -
accessibility-onetap/trunk/includes/class-accessibility-onetap.php
r3186519 r3202843 179 179 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' ); 180 180 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' ); 181 $this->loader->add_action( 'admin_notices', $plugin_admin, 'display_admin_notice' ); 182 $this->loader->add_action( 'wp_ajax_onetap_action_dismiss_notice', $plugin_admin, 'dismiss_notice_ajax_callback' ); 181 183 182 184 } -
accessibility-onetap/trunk/public/class-accessibility-onetap-public.php
r3186519 r3202843 658 658 'accessibilityStatement' => 'Saavutettavuuslausunto', 659 659 'version' => 'Versio ' . $plugin_version, 660 ), 661 ), 662 'pt' => array( 663 'header' => array( 664 'language' => 'Português', 665 'listLanguages' => array( 666 'en' => 'English (USA)', 667 'de' => 'Deutsch', 668 'es' => 'Español', 669 'fr' => 'Français', 670 'it' => 'Italiano', 671 'pl' => 'Polski', 672 'se' => 'Svenska', 673 'fi' => 'Suomi', 674 'pt' => 'Português', 675 ), 676 'title' => 'Ajustes de Acessibilidade', 677 'desc' => 'Desenvolvido por', 678 'anchor' => 'OneTap', 679 ), 680 'general' => array( 681 'biggerText' => 'Texto Maior', 682 'cursor' => 'Cursor', 683 'lineHeight' => 'Altura da Linha', 684 'hideImages' => 'Ocultar Imagens', 685 'readableFont' => 'Fonte Legível', 686 'dyslexicFont' => 'Fonte para Disléxicos', 687 ), 688 'colors' => array( 689 'invertColors' => 'Inverter Cores', 690 'brightness' => 'Brilho', 691 'contrast' => 'Contraste', 692 'grayscale' => 'Escala de Cinza', 693 'saturation' => 'Saturação', 694 ), 695 'navigation' => array( 696 'readingLine' => 'Linha de Leitura', 697 'highlightLinks' => 'Destacar Links', 698 'readPage' => 'Ler Página', 699 'readingMask' => 'Máscara de Leitura', 700 ), 701 'divider' => array( 702 'colors' => 'Cores', 703 'navigation' => 'Navegação', 704 ), 705 'resetSettings' => 'Redefinir Ajustes', 706 'footer' => array( 707 'accessibilityStatement' => 'Declaração de Acessibilidade', 708 'version' => 'Versão ' . $plugin_version, 709 ), 710 ), 711 'ro' => array( 712 'header' => array( 713 'language' => 'Română', 714 'listLanguages' => array( 715 'en' => 'English (USA)', 716 'de' => 'Deutsch', 717 'es' => 'Español', 718 'fr' => 'Français', 719 'it' => 'Italiano', 720 'pl' => 'Polski', 721 'se' => 'Svenska', 722 'fi' => 'Suomi', 723 'ro' => 'Română', 724 ), 725 'title' => 'Ajustări de Accesibilitate', 726 'desc' => 'Dezvoltat de', 727 'anchor' => 'OneTap', 728 ), 729 'general' => array( 730 'biggerText' => 'Text Mai Mare', 731 'cursor' => 'Cursor', 732 'lineHeight' => 'Înălțimea Linie', 733 'hideImages' => 'Ascunde Imagini', 734 'readableFont' => 'Font Ușor de Citit', 735 'dyslexicFont' => 'Font pentru Dislexie', 736 ), 737 'colors' => array( 738 'invertColors' => 'Inversează Culorile', 739 'brightness' => 'Luminozitate', 740 'contrast' => 'Contrast', 741 'grayscale' => 'Scară de Gri', 742 'saturation' => 'Saturație', 743 ), 744 'navigation' => array( 745 'readingLine' => 'Linie de Citire', 746 'highlightLinks' => 'Evidențiază Linkuri', 747 'readPage' => 'Citește Pagina', 748 'readingMask' => 'Mască de Citire', 749 ), 750 'divider' => array( 751 'colors' => 'Culori', 752 'navigation' => 'Navigare', 753 ), 754 'resetSettings' => 'Resetează Setările', 755 'footer' => array( 756 'accessibilityStatement' => 'Declarație de Accesibilitate', 757 'version' => 'Versiunea ' . $plugin_version, 758 ), 759 ), 760 'si' => array( 761 'header' => array( 762 'language' => 'Slovenščina', 763 'listLanguages' => array( 764 'en' => 'English (USA)', 765 'de' => 'Deutsch', 766 'es' => 'Español', 767 'fr' => 'Français', 768 'it' => 'Italiano', 769 'pl' => 'Polski', 770 'se' => 'Svenska', 771 'fi' => 'Suomi', 772 'ro' => 'Română', 773 'sl' => 'Slovenščina', 774 ), 775 'title' => 'Prilagoditve Dostopnosti', 776 'desc' => 'Omogoča', 777 'anchor' => 'OneTap', 778 ), 779 'general' => array( 780 'biggerText' => 'Večje Besedilo', 781 'cursor' => 'Kazalec', 782 'lineHeight' => 'Višina Vrstice', 783 'hideImages' => 'Skrij Slike', 784 'readableFont' => 'Beri Prijazna Pisava', 785 'dyslexicFont' => 'Pisava za Dislektike', 786 ), 787 'colors' => array( 788 'invertColors' => 'Obrni Barve', 789 'brightness' => 'Svetlost', 790 'contrast' => 'Kontrast', 791 'grayscale' => 'Sivinska', 792 'saturation' => 'Nasičenost', 793 ), 794 'navigation' => array( 795 'readingLine' => 'Črta za Branje', 796 'highlightLinks' => 'Poudari Povezave', 797 'readPage' => 'Preberi Stran', 798 'readingMask' => 'Maska za Branje', 799 ), 800 'divider' => array( 801 'colors' => 'Barve', 802 'navigation' => 'Navigacija', 803 ), 804 'resetSettings' => 'Ponastavi Nastavitve', 805 'footer' => array( 806 'accessibilityStatement' => 'Izjava o Dostopnosti', 807 'version' => 'Različica ' . $plugin_version, 808 ), 809 ), 810 'sk' => array( 811 'header' => array( 812 'language' => 'Slovenčina', 813 'listLanguages' => array( 814 'en' => 'English (USA)', 815 'de' => 'Deutsch', 816 'es' => 'Español', 817 'fr' => 'Français', 818 'it' => 'Italiano', 819 'pl' => 'Polski', 820 'se' => 'Svenska', 821 'fi' => 'Suomi', 822 'ro' => 'Română', 823 'sl' => 'Slovenščina', 824 'sk' => 'Slovenčina', 825 ), 826 'title' => 'Prispôsobenia Prístupnosti', 827 'desc' => 'Podporované', 828 'anchor' => 'OneTap', 829 ), 830 'general' => array( 831 'biggerText' => 'Väčší Text', 832 'cursor' => 'Kurzor', 833 'lineHeight' => 'Výška Riadku', 834 'hideImages' => 'Skryť Obrázky', 835 'readableFont' => 'Čitateľné Písmo', 836 'dyslexicFont' => 'Písmo pre Dyslektikov', 837 ), 838 'colors' => array( 839 'invertColors' => 'Invertovať Farby', 840 'brightness' => 'Jas', 841 'contrast' => 'Kontrast', 842 'grayscale' => 'Odtiene Šedej', 843 'saturation' => 'Saturácia', 844 ), 845 'navigation' => array( 846 'readingLine' => 'Čítacia Čiara', 847 'highlightLinks' => 'Zvýrazniť Odkazy', 848 'readPage' => 'Čítať Stránku', 849 'readingMask' => 'Čítacia Maska', 850 ), 851 'divider' => array( 852 'colors' => 'Farby', 853 'navigation' => 'Navigácia', 854 ), 855 'resetSettings' => 'Obnoviť Nastavenia', 856 'footer' => array( 857 'accessibilityStatement' => 'Vyhlásenie o Prístupnosti', 858 'version' => 'Verzia ' . $plugin_version, 660 859 ), 661 860 ), … … 792 991 <img src="<?php echo esc_url( ACCESSIBILITY_ONETAP_PLUGINS_URL . 'assets/images/swedish.png' ); ?>" alt="se"> 793 992 <img src="<?php echo esc_url( ACCESSIBILITY_ONETAP_PLUGINS_URL . 'assets/images/finnland.png' ); ?>" alt="fi"> 993 <img src="<?php echo esc_url( ACCESSIBILITY_ONETAP_PLUGINS_URL . 'assets/images/portugal.png' ); ?>" alt="pt"> 994 <img src="<?php echo esc_url( ACCESSIBILITY_ONETAP_PLUGINS_URL . 'assets/images/rumania.png' ); ?>" alt="ro"> 995 <img src="<?php echo esc_url( ACCESSIBILITY_ONETAP_PLUGINS_URL . 'assets/images/slowenien.png' ); ?>" alt="sk"> 996 <img src="<?php echo esc_url( ACCESSIBILITY_ONETAP_PLUGINS_URL . 'assets/images/slowakia.png' ); ?>" alt="si"> 794 997 </div> 795 998 <p class="onetap-text"> … … 828 1031 <?php esc_html_e( 'Suomi', 'accessibility-onetap' ); ?> 829 1032 </li> 1033 <li data-language="pt"> 1034 <?php esc_html_e( 'Português', 'accessibility-onetap' ); ?> 1035 </li> 1036 <li data-language="ro"> 1037 <?php esc_html_e( 'Română', 'accessibility-onetap' ); ?> 1038 </li> 1039 <li data-language="si"> 1040 <?php esc_html_e( 'Slovenščina', 'accessibility-onetap' ); ?> 1041 </li> 1042 <li data-language="sk"> 1043 <?php esc_html_e( 'Slovenčina', 'accessibility-onetap' ); ?> 1044 </li> 830 1045 </ul> 831 1046 </div> -
accessibility-onetap/trunk/src/assets/js/script.js
r3186519 r3202843 142 142 function accessibilityOnetapUpdateContentBasedOnLanguage( language ) { 143 143 // Define a list of valid languages 144 const validLanguages = [ 'en', 'de', 'es', 'fr', 'it', 'pl', 'se', 'fi' ];144 const validLanguages = [ 'en', 'de', 'es', 'fr', 'it', 'pl', 'se', 'fi', 'pt', 'ro', 'si', 'sk' ]; 145 145 146 146 // Check if the provided language is valid
Note: See TracChangeset
for help on using the changeset viewer.