Changeset 2735012
- Timestamp:
- 05/31/2022 05:36:15 PM (4 years ago)
- Location:
- herp-derp
- Files:
-
- 3 edited
- 4 copied
-
tags/1.5 (copied) (copied from herp-derp/trunk)
-
tags/1.5/herpderp.js (copied) (copied from herp-derp/trunk/herpderp.js) (5 diffs)
-
tags/1.5/herpderp.php (copied) (copied from herp-derp/trunk/herpderp.php) (4 diffs)
-
tags/1.5/readme.txt (copied) (copied from herp-derp/trunk/readme.txt) (2 diffs)
-
trunk/herpderp.js (modified) (5 diffs)
-
trunk/herpderp.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
herp-derp/tags/1.5/herpderp.js
r2361537 r2735012 1 1 /* Herp all the derps. 2 2 3 Copyright © 2012-20 19Jamie Zawinski <jwz@jwz.org>3 Copyright © 2012-2022 Jamie Zawinski <jwz@jwz.org> 4 4 5 5 Permission to use, copy, modify, distribute, and sell this software and its … … 24 24 This version by jwz, created: 13-Dec-2012. Derp. 25 25 */ 26 27 (function() { 26 28 27 29 function derp(p, herpa) { … … 89 91 } 90 92 91 return ( Derpfault &&Derpfault.herp == 'herp');93 return (window.Derpfault && window.Derpfault.herp == 'herp'); 92 94 } 93 95 … … 104 106 herpa (e.target.checked); 105 107 cderp (e.target.checked); 106 return false;108 return true; 107 109 } 108 110 … … 114 116 if (derp) herpa (derp); 115 117 var p = document.createElement('div'); 116 var cb = '<INPUT TYPE=CHECKBOX ' +117 (derp ? 'CHECKED ' : '') +118 'ONCLICK="herpterg(event)">';119 cb = 'Herp Derp' + cb;120 p.innerHTML = cb;121 118 p.className = 'herpderp'; 119 120 var cb = document.createElement('input'); 121 cb.type = 'checkbox'; 122 if (derp) cb.checked = true; 123 cb.onclick = herpterg; 124 125 p.appendChild (document.createTextNode('Herp Derp')); 126 p.appendChild (cb); 127 122 128 e.parentNode.insertBefore (p, e); 123 129 } 124 130 125 herpies(); 131 if (document.readyState === 'loading') { 132 document.addEventListener ("DOMContentLoaded", herpies); 133 } else { 134 herpies(); 135 } 136 137 })(); -
herp-derp/tags/1.5/herpderp.php
r2361537 r2735012 3 3 Plugin Name: Herp Derp 4 4 Plugin URI: https://www.jwz.org/herpderp/ 5 Version: 1. 45 Version: 1.5 6 6 Description: This plugin adds a checkbox to replace the text of your comments with "Herp Derp". 7 7 Author: Jamie Zawinski … … 9 9 */ 10 10 11 /* Copyright © 2012-20 17Jamie Zawinski <jwz@jwz.org>11 /* Copyright © 2012-2022 Jamie Zawinski <jwz@jwz.org> 12 12 13 13 Permission to use, copy, modify, distribute, and sell this software and its … … 39 39 global $herpderp_plugin_name; 40 40 global $herpderp_prefs_toggle_key; 41 $options = get_option ($herpderp_plugin_name) ;42 $def = $options [$herpderp_prefs_toggle_key];41 $options = get_option ($herpderp_plugin_name) ?? null; 42 $def = $options ? $options[$herpderp_prefs_toggle_key] : false; 43 43 44 44 wp_register_script ('herpderp', … … 174 174 175 175 $options = get_option ($herpderp_plugin_name); 176 $def_toggle = $options [$herpderp_prefs_toggle_key];176 $def_toggle = $options ? $options[$herpderp_prefs_toggle_key] : false; 177 177 178 178 echo "<input id='$herpderp_prefs_toggle_id' -
herp-derp/tags/1.5/readme.txt
r2361535 r2735012 4 4 Tags: herp, derp 5 5 Requires at least: 2.7 6 Tested up to: 5.57 Stable tag: 1. 46 Tested up to: 6.0 7 Stable tag: 1.5 8 8 9 9 This plugin herps all the derps. … … 42 42 * Derpier herps. 43 43 44 = 1.5 = 45 * Made the JS be asyncable. Eliminated some PHP warnings. 46 -
herp-derp/trunk/herpderp.js
r2361537 r2735012 1 1 /* Herp all the derps. 2 2 3 Copyright © 2012-20 19Jamie Zawinski <jwz@jwz.org>3 Copyright © 2012-2022 Jamie Zawinski <jwz@jwz.org> 4 4 5 5 Permission to use, copy, modify, distribute, and sell this software and its … … 24 24 This version by jwz, created: 13-Dec-2012. Derp. 25 25 */ 26 27 (function() { 26 28 27 29 function derp(p, herpa) { … … 89 91 } 90 92 91 return ( Derpfault &&Derpfault.herp == 'herp');93 return (window.Derpfault && window.Derpfault.herp == 'herp'); 92 94 } 93 95 … … 104 106 herpa (e.target.checked); 105 107 cderp (e.target.checked); 106 return false;108 return true; 107 109 } 108 110 … … 114 116 if (derp) herpa (derp); 115 117 var p = document.createElement('div'); 116 var cb = '<INPUT TYPE=CHECKBOX ' +117 (derp ? 'CHECKED ' : '') +118 'ONCLICK="herpterg(event)">';119 cb = 'Herp Derp' + cb;120 p.innerHTML = cb;121 118 p.className = 'herpderp'; 119 120 var cb = document.createElement('input'); 121 cb.type = 'checkbox'; 122 if (derp) cb.checked = true; 123 cb.onclick = herpterg; 124 125 p.appendChild (document.createTextNode('Herp Derp')); 126 p.appendChild (cb); 127 122 128 e.parentNode.insertBefore (p, e); 123 129 } 124 130 125 herpies(); 131 if (document.readyState === 'loading') { 132 document.addEventListener ("DOMContentLoaded", herpies); 133 } else { 134 herpies(); 135 } 136 137 })(); -
herp-derp/trunk/herpderp.php
r2361537 r2735012 3 3 Plugin Name: Herp Derp 4 4 Plugin URI: https://www.jwz.org/herpderp/ 5 Version: 1. 45 Version: 1.5 6 6 Description: This plugin adds a checkbox to replace the text of your comments with "Herp Derp". 7 7 Author: Jamie Zawinski … … 9 9 */ 10 10 11 /* Copyright © 2012-20 17Jamie Zawinski <jwz@jwz.org>11 /* Copyright © 2012-2022 Jamie Zawinski <jwz@jwz.org> 12 12 13 13 Permission to use, copy, modify, distribute, and sell this software and its … … 39 39 global $herpderp_plugin_name; 40 40 global $herpderp_prefs_toggle_key; 41 $options = get_option ($herpderp_plugin_name) ;42 $def = $options [$herpderp_prefs_toggle_key];41 $options = get_option ($herpderp_plugin_name) ?? null; 42 $def = $options ? $options[$herpderp_prefs_toggle_key] : false; 43 43 44 44 wp_register_script ('herpderp', … … 174 174 175 175 $options = get_option ($herpderp_plugin_name); 176 $def_toggle = $options [$herpderp_prefs_toggle_key];176 $def_toggle = $options ? $options[$herpderp_prefs_toggle_key] : false; 177 177 178 178 echo "<input id='$herpderp_prefs_toggle_id' -
herp-derp/trunk/readme.txt
r2361535 r2735012 4 4 Tags: herp, derp 5 5 Requires at least: 2.7 6 Tested up to: 5.57 Stable tag: 1. 46 Tested up to: 6.0 7 Stable tag: 1.5 8 8 9 9 This plugin herps all the derps. … … 42 42 * Derpier herps. 43 43 44 = 1.5 = 45 * Made the JS be asyncable. Eliminated some PHP warnings. 46
Note: See TracChangeset
for help on using the changeset viewer.