Gets the inline JavaScript for hiding messages
357921
protected function getInlineJavaScript()
    {
        static $shown = false;

        if (!$shown) {
            $javascript = $this->getInlineJavaScriptTranslations();
            $shown = true;
        } else {
            $javascript = '';
        }

        $dismissable_messages =
            '[' . implode(', ', $this->dismissable_messages) . ']';

        $javascript .= sprintf(
            "var %s_obj = new %s('%s', %s);",
            $this->id,
            $this->getJavaScriptClass(),
            $this->id,
            $dismissable_messages
        );

        return $javascript;
    }
261062
protected function getInlineJavaScript()
    {
        $resizeable = $this->resizeable ? 'true' : 'false';
        return sprintf(
            "var %s_obj = new SwatTextarea('%s', %s);",
            $this->id,
            $this->id,
            $resizeable
        );
    }
560795
function buildMessageHTML(messageText, messageSenderId, messageDateSent, attachmentFileId, messageId, status){
  var messageAttach;
  if(attachmentFileId){
      messageAttach = '<img src="' + QB.content.publicUrl(attachmentFileId) + '/' + '/download.xml?token='+token+'" alt="attachment" class="attachments img-responsive" />';
  }

	var isMessageSticker = stickerpipe.isSticker(messageText);

  var delivered = '<img class="icon-small" src="images/delivered.jpg" alt="" id="delivered_'+messageId+'">';
  var read = '<img class="icon-small" src="images/read.jpg" alt="" id="read_'+messageId+'">';

	var messageTextHtml = messageText;
	if (messageAttach) {
		messageTextHtml = messageAttach;
	} else if (isMessageSticker) {
		messageTextHtml = '<div class="message-sticker-container"></div>';

		stickerpipe.parseStickerFromText(messageText, function(sticker, isAsync) {
			if (isAsync) {
				$('#' + messageId + ' .message-sticker-container').html(sticker.html);
			} else {
				messageTextHtml = sticker.html;
			}
		});
	}

  var messageHtml =
			'<div class="list-group-item" id="'+messageId+'">'+
				'<time datetime="'+messageDateSent+ '" class="pull-right">'
					+jQuery.timeago(messageDateSent)+
				'</time>'+

				'<h4 class="list-group-item-heading">'+messageSenderId+'</h4>'+
				'<p class="list-group-item-text">'+
					messageTextHtml +
				'</p>'
				+delivered+read+
			'</div>';
  return messageHtml;
}
1170010
function guardTextInMixins() {
      for (const { mixin, code, tag } of deferred) {
        if (calledInSensitiveContext.has(mixin)) {
          const guards = calledInSensitiveContext.get(mixin);
          if (code) {
            for (const guard of guards) {
              code.val = addGuard(guard, code.val);
              code.mustEscape = false;
            }
          } else if (guards.has(trustedScriptGuard)) {
            distrust(
              `HTML tag <${ tag.name
              }> may appear inside <script> which cannot have tag content via call to +${ mixin }`,
              tag);
          }
        } else if (code) {
          code.val = addGuard(trustedHTMLGuard, code.val);
          code.mustEscape = false;
        }
      }
    }
1060203
protected function getInlineJavaScript()
    {
        $javascript = '';

        foreach ($this->fields as $field) {
            $field_javascript = $field->getRendererInlineJavaScript();
            if ($field_javascript != '') {
                $javascript .= "\n" . $field_javascript;
            }
        }

        foreach ($this->fields as $field) {
            $field_javascript = $field->getInlineJavaScript();
            if ($field_javascript != '') {
                $javascript .= "\n" . $field_javascript;
            }
        }

        return $javascript;
    }
310741
function getCurrentScript() {
        if ( currentlyAddingScript ) {
            return currentlyAddingScript;
        }
        else if (
            interactiveScript
            && interactiveScript.readyState === 'interactive'
        ) {
            return interactiveScript;
        }
        else {
            var scripts = document.getElementsByTagName( 'script' );
            var scriptLen = scripts.length;
            while ( scriptLen-- ) {
                var script = scripts[ scriptLen ];
                if ( script.readyState === 'interactive' ) {
                    interactiveScript = script;
                    return script;
                }
            }
        }
    }
240161
function ( message ) {
        this._hideMessage();

        var div = $.makeNeutralElement( "div" );
        div.appendChild( document.createTextNode( message ) );

        this.messageDiv = $.makeCenteredNode( div );

        $.addClass(this.messageDiv, "openseadragon-message");

        this.container.appendChild( this.messageDiv );
    }
856564
function getElementsMessages(elements) {
    return elements
        .map(function (element) {
        var msg = {};
        if (element.attributes) {
            element.attributes.properties.forEach(function (attr) {
                if (!ts.isJsxAttribute(attr) || !attr.initializer) {
                    // Either JsxSpreadAttribute, or JsxAttribute without initializer.
                    return;
                }
                var key = attr.name.text;
                var init = attr.initializer;
                var text;
                if (ts.isStringLiteral(init)) {
                    text = init.text;
                }
                else if (ts.isJsxExpression(init)) {
                    if (init.expression &&
                        (ts.isStringLiteral(init.expression) ||
                            ts.isNoSubstitutionTemplateLiteral(init.expression))) {
                        text = init.expression.text;
                    }
                    else {
                        // Either the JsxExpression has no expression (?)
                        // or a non-StringLiteral expression.
                        return;
                    }
                }
                else {
                    // Should be a StringLiteral or JsxExpression, but it's not!
                    return;
                }
                copyIfMessageKey(msg, key, text);
            });
        }
        return isValidMessage(msg) ? msg : null;
    })
        .filter(notNull);
}
866283
def js_reverse_inline(context):
    
    if 'request' in context:
        default_urlresolver = get_resolver(getattr(context['request'], 'urlconf', None))
    else:
        default_urlresolver = get_resolver(None)
    return mark_safe(generate_js(default_urlresolver))
882521
function inlineOptimze(source) {
    var blocks = [];
    var sections = source.split(INLINE_START_REG);
    sections.forEach(function(s) {
      if (s.match(INLINE_END_REG) && !s.match(JSFILE_REG)) {
        // s[0] css rules or js code
        // s[1] </style> or </script>
        // s[2] other html code after </style> </script>
        s = s.split(INLINE_END_REG);
        switch (s[1]) {
          case '</style>':
            s[0] = optimizeCss(s[0]);
            break;
          case '</script>':
            s[0] = optimizeJs(s[0]);
            break;
        }
        blocks.push(s.join(''));
      } else {
        blocks.push(s);
      }
    });
    return blocks.join('');
  }
680333
function(message){
			document.getElementById('messageLabel').classList.add("errorMessage"); //$NON-NLS-0$ //$NON-NLS-1$
			document.getElementById('messageContainer').classList.add("errorMessage"); //$NON-NLS-0$ //$NON-NLS-1$
			lib.empty(document.getElementById('messageText')); //$NON-NLS-0$
			
			document.getElementById('messageText').style.width = "calc(100% - 10px)"; //$NON-NLS-0$ //$NON-NLS-1$
			document.getElementById('messageText').appendChild(WizardUtils.defaultParseMessage(message)); //$NON-NLS-0$
			lib.empty(document.getElementById('messageButton')); //$NON-NLS-0$
			
			document.getElementById('messageButton').className = "dismissButton core-sprite-close imageSprite"; //$NON-NLS-0$ //$NON-NLS-1$
			document.getElementById('messageButton').onclick = WizardUtils.defaultHideMessage; //$NON-NLS-0$
			document.getElementById('messageContainer').classList.add("showing"); //$NON-NLS-0$ //$NON-NLS-1$
		}
1037908
protected function getInlineJavaScript()
    {
        $javascript = sprintf(
            "var %s_obj = new %s(%s, %s);",
            $this->id,
            $this->getJavaScriptClass(),
            SwatString::quoteJavaScriptString($this->id),
            SwatString::quoteJavaScriptString($this->connection_close_uri)
        );

        if ($this->autofocus) {
            $focusable = true;
            if ($this->default_focused_control === null) {
                $control = $this->getFirstDescendant('SwatControl');
                if ($control === null) {
                    $focusable = false;
                } else {
                    $focus_id = $control->getFocusableHtmlId();
                    if ($focus_id === null) {
                        $focusable = false;
                    }
                }
            } else {
                $focus_id = $this->default_focused_control->getFocusableHtmlId();

                if ($focus_id === null) {
                    $focusable = false;
                }
            }

            if ($focusable) {
                $javascript .= "\n{$this->id}_obj.setDefaultFocus('{$focus_id}');";
            }
        }

        if (!$this->autocomplete) {
            $javascript .= "\n{$this->id}_obj.setAutocomplete(false);";
        }

        return $javascript;
    }
1124468
public function headerDeferJavascripts()
    {
        add_filter('script_loader_tag', function ($tag, $handle) {
            // Main WP jQuery is not concerned
            if (strpos($tag, '/wp-includes/js/jquery/jquery')) {
                return $tag;
            }

            // Defer on MSIE is not permitted
            if (isset($_SERVER['HTTP_USER_AGENT']) && false !== strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 9.')) {
                return $tag;
            }

            return str_replace(' src', ' defer src', $tag);
        }, 10, 2);
    }
549368
public function getInlineJavaScript()
    {
        if (count($this->view->model) < 2) {
            return '';
        }

        // set the controller of the check-all widget
        return sprintf(
            "%s_obj.setController(%s);",
            $this->check_all->id,
            $this->list_id
        );
    }
452170
function getElementsVisibility(elements) {

  var result = {};

  elements.forEach(function(e) {
    result[e.id] = e.hidden;
  });

  return result;
}
174396
function messageItem( text, optionalOptions = {} ) {
      const {
         level = 'ERROR',
         replacements = [],
         sourceInfo = { file: 'a.js', line: 100 }
      } = optionalOptions;
      return { text, level, replacements, sourceInfo };
   }
930405
public String listJs() {

        StringBuffer js = new StringBuffer(1024);
        CmsMessages messages = Messages.get().getBundle(getWp().getLocale());
        js.append("<script type='text/javascript' src='");
        js.append(CmsWorkplace.getSkinUri());
        js.append("jquery/unpacked/jquery.js'></script>\n");
        js.append("<script type='text/javascript' src='");
        js.append(CmsWorkplace.getSkinUri());
        js.append("jquery/unpacked/jquery.hint.js'></script>\n");
        js.append("<script type='text/javascript' src='");
        js.append(CmsWorkplace.getSkinUri());
        js.append("admin/javascript/list.js'></script>\n");
        if (!m_metadata.getMultiActions().isEmpty()) {
            js.append("<script type='text/javascript'>\n");
            js.append("\tvar ");
            js.append(NO_SELECTION_HELP_VAR);
            js.append(" = '");
            js.append(CmsStringUtil.escapeJavaScript(messages.key(Messages.GUI_LIST_ACTION_NO_SELECTION_0)));
            js.append("';\n");
            Iterator<CmsListMultiAction> it = m_metadata.getMultiActions().iterator();
            while (it.hasNext()) {
                CmsListMultiAction action = it.next();
                if (action instanceof CmsListRadioMultiAction) {
                    CmsListRadioMultiAction rAction = (CmsListRadioMultiAction)action;
                    js.append("\tvar ");
                    js.append(NO_SELECTION_MATCH_HELP_VAR);
                    js.append(rAction.getId());
                    js.append(" = '");
                    js.append(
                        CmsStringUtil.escapeJavaScript(
                            messages.key(
                                Messages.GUI_LIST_ACTION_NO_SELECTION_MATCH_1,
                                new Integer(rAction.getSelections()))));
                    js.append("';\n");
                }
            }
            js.append("</script>\n");
        }
        return js.toString();
    }