<commit_before><link rel="import" href="../polymer/polymer-element.html">

<dom-module id="polymer-particles">
  <template>
    <style>
      :host {
        display: var(--polymer-particles-background-display, block);
        background-color: var(--polymer-particles-background-color, red);
        position: var(--polymer-particles-background-position, relative);
        width: var(--polymer-particles-background-width, 100%);
        height: var(--polymer-particles-background-height, 100%);
        @apply --polymer-particles-background;
      }
    </style>
    <div id="particles-js">
      <slot></slot>
    </div>
  </template>
  <!-- <script src="../../bower_components/particles.js/particles.js" async defer></script>-->
  <script src="./polymer-particles.js" async defer></script>
  <script>
    /**
     * `polymer-particles`
     * A polymer integration with particles Js!
     *
     * @customElement
     * @polymer
     * @demo demo/index.html
     */
    class PolymerParticles extends Polymer.Element {
      static get is() { return 'polymer-particles' }
      static get properties() {
        return {
          jsonUrl: {
            type: String,
            value: '../../../default-config.json'
          },
          pJSDom: {
            type: Array,
            value: [],
          },
        }
      }

      ready(){
        super.ready()
        this.load('particles-js', `${this.jsonUrl}`, function() {
          console.log('callback - particles.js config loaded');
        });
      }


      particlesJS(tag_id, params){

        //console.log(params);

        /* no string id? so it's object params, and set the id with default id */
        if(typeof(tag_id) != 'string'){
          params = tag_id;
          tag_id = 'particles-js';
        }

        /* no id? set the id to default id */
        if(!tag_id){
          tag_id = 'particles-js';
        }

        /* pJS elements */
        var pJS_tag = this.$[tag_id],
            pJS_canvas_class = 'particles-js-canvas-el',
            exist_canvas = pJS_tag.querySelectorAll(`.${pJS_canvas_class}`)<commit_msg>Removed callback, corrected url to relative one<commit_after><link rel="import" href="../polymer/polymer-element.html">

<dom-module id="polymer-particles">
  <template>
    <style>
      :host {
        display: var(--polymer-particles-background-display, block);
        background-color: var(--polymer-particles-background-color, red);
        position: var(--polymer-particles-background-position, relative);
        width: var(--polymer-particles-background-width, 100%);
        height: var(--polymer-particles-background-height, 100%);
        @apply --polymer-particles-background;
      }
    </style>
    <div id="particles-js">
      <slot></slot>
    </div>
  </template>
  <script src="/polymer-particles.js" async defer></script>
  <script>
    /**
     * `polymer-particles`
     * A polymer integration with particles Js!
     *
     * @customElement
     * @polymer
     * @demo demo/index.html
     */
    class PolymerParticles extends Polymer.Element {
      static get is() { return 'polymer-particles' }
      static get properties() {
        return {
          jsonUrl: {
            type: String,
            value: '/default-config.json'
          },
          pJSDom: {
            type: Array,
            value: [],
          },
        }
      }

      ready(){
        super.ready()
        this.load('particles-js', `${this.jsonUrl}`)
      }


      particlesJS(tag_id, params){

        //console.log(params);

        /* no string id? so it's object params, and set the id with default id */
        if(typeof(tag_id) != 'string'){
          params = tag_id;
          tag_id = 'particles-js';
        }

        /* no id? set the id to default id */
        if(!tag_id){
          tag_id = 'particles-js';
        }

        /* pJS elements */
        var pJS_tag = this.$[tag_id],
            pJS_canvas_class = 'particles-js-canvas-el',
            exist_canvas = pJS_tag.querySelectorAll(`.${pJS_canvas_class}`)
{'fraction_non_alphanumeric': 0.1480660261148066, 'fraction_numerical': 0.0029563932002956393, 'mean_word_length': 1.9527272727272726, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 32, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7423943', 'n_tokens_mistral': 1258, 'n_tokens_neox': 1197, 'n_words': 246}