Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {var LINKS = <link type="text/css" rel="stylesheet" href="{IMG}style.css" />}
- <script type="text/javascript">
- <!--
- $(document).ready(function() {
- var settings = JSON.parse('{PLUGIN-SETTINGS}' || null);
- var handler = function(json) {
- /* response handler here */
- console.log(json);
- }
- function register_plugin(collector) {
- var plugin = {
- "name": collector['name'],
- "collector": collector,
- "handler": handler,
- "load": (check_option('{OPTIONS}', 'sync') ? 'sync' : 'async')
- }
- register_handler(plugin);
- register_event('edit-config', import_config, collector['name']);
- }
- function dbinit() {
- var collector = {
- "name": "{PLUGIN-NAME}.{ID}",
- "path": "{PLUGIN-DIR}",
- "folder": "{FOLDER}",
- "page": "{PAGE}"
- }
- register_plugin(collector);
- if (!check_option('{OPTIONS}', 'sync'))
- $.post('{AJAX}dbinit.php', collector, handler, 'html');
- }
- dbinit();
- function import_config() {
- let config = ssb_get('edit-config');
- // console.log(config);
- }
- });
- -->
- </script>
- <div class="{PLUGIN-NAME}-{ID}" data-plugin-name="{PLUGIN-NAME}.{ID}">
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement