Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');| <?php | |
| // Import arbitrary config from a variable. | |
| // Assumes $data has the data you want to import for this config. | |
| $config = \Drupal::service('config.factory')->getEditable('filter.format.basic_html'); | |
| $config->setData($data)->save(); | |
| // Or, re-import the default config for a module or profile, etc. | |
| \Drupal::service('config.installer')->installDefaultConfig('module', 'my_custom_module'); |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');| /** | |
| * Implements hook_page_alter(). | |
| */ | |
| function batch_yakety_sax_page_alter(&$page) { | |
| if (current_path() == 'batch' && isset($_REQUEST['id']) && batch_load($_REQUEST['id'])) { | |
| $page['content']['system_main']['yakety']['#markup'] = '<iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/playlists/28530082&color=0066cc&auto_play=true&hide_related=false&show_artwork=true"></iframe>'; | |
| } | |
| } |