<commit_before>'use strict';

angular.module('copayApp.services').service('externalLinkService', function(platformInfo, nodeWebkitService, popupService, gettextCatalog) {

  this.open = function(url, desc) {
    if (platformInfo.isNW) {
      nodeWebkitService.openExternalLink(url);
    } else {
      desc = desc || 'this link';
      var message = gettextCatalog.getString('You are leaving to view ' + desc + ''),
        openBrowser = function(res) {
          if (res) window.open(url, '_system');
        };
      popupService.showConfirm('Opening Browser', message, 'Open', 'Cancel', openBrowser);
    }
  };

});<commit_msg>added opt in option, and new inputs to make modal completely custom per use.<commit_after>'use strict';

angular.module('copayApp.services').service('externalLinkService', function(platformInfo, nodeWebkitService, popupService, gettextCatalog) {

  this.open = function(url, optIn, title, desc, okText, cancelText) {
    if (platformInfo.isNW) {
      nodeWebkitService.openExternalLink(url);
    } else {
      var message = gettextCatalog.getString(desc),
        title = gettextCatalog.getString(title),
        openBrowser = function(res) {
          if (res) window.open(url, '_system');
        };
      popupService.showConfirm(title, message, 'Open', 'Cancel', openBrowser);
    }
  };

});
{'fraction_non_alphanumeric': 0.13458646616541353, 'fraction_numerical': 0.0, 'mean_word_length': 3.8050541516245486, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5435859', 'n_tokens_mistral': 388, 'n_tokens_neox': 383, 'n_words': 85}