Advertisement
Guest User

test

a guest
Apr 18th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {var LINKS = <link type="text/css" rel="stylesheet" href="{IMG}style.css" />}
  2.  
  3. <script type="text/javascript">
  4. <!--
  5.     $(document).ready(function() {
  6.         var settings = JSON.parse('{PLUGIN-SETTINGS}' || null);
  7.  
  8.         var handler = function(json) {
  9.             /* response handler here */
  10.             console.log(json);
  11.             }
  12.  
  13.         function register_plugin(collector) {
  14.             var plugin = {
  15.             "name": collector['name'],
  16.             "collector": collector,
  17.             "handler": handler,
  18.             "load": (check_option('{OPTIONS}', 'sync') ? 'sync' : 'async')
  19.             }
  20.  
  21.             register_handler(plugin);
  22.             register_event('edit-config', import_config, collector['name']);
  23.         }
  24.  
  25.         function dbinit() {
  26.             var collector = {
  27.                 "name": "{PLUGIN-NAME}.{ID}",
  28.                 "path": "{PLUGIN-DIR}",
  29.                 "folder": "{FOLDER}",
  30.                 "page": "{PAGE}"
  31.             }
  32.  
  33.             register_plugin(collector);
  34.  
  35.             if (!check_option('{OPTIONS}', 'sync'))
  36.                 $.post('{AJAX}dbinit.php', collector, handler, 'html');
  37.         }
  38.  
  39.         dbinit();
  40.  
  41.        
  42.         function import_config() {
  43.             let config = ssb_get('edit-config');
  44.   //          console.log(config);
  45.         }
  46.  
  47.     });
  48. -->
  49. </script>
  50.  
  51. <div class="{PLUGIN-NAME}-{ID}" data-plugin-name="{PLUGIN-NAME}.{ID}">
  52.  
  53. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement