Last active
August 29, 2015 14:11
-
-
Save mattosborn/378f66e245a00c72a8d8 to your computer and use it in GitHub Desktop.
spacefinder-debug.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
require([ | |
'common/utils/$', | |
'common/utils/detect', | |
'common/modules/article/spacefinder', | |
'common/modules/commercial/article-body-adverts' | |
], function( | |
$, | |
detect, | |
spacefinder, | |
articleBodyAdverts | |
) { | |
var css = '.spacefinder--error { color: #999999 !important; } .spacefinder--valid:before, .spacefinder--error:before { position: absolute; z-index: 2; font-size: 12px; padding: 0px 5px; border-radius: 5px; line-height: 20px; font-family: "Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif; color: white; box-shadow: 0 0 7px 2px rgba(0,0,0,0.5); } .spacefinder--error:before { content: attr(data-spacefinder-msg); background-color: rgb(223, 68, 68); border: 1px solid rgb(166, 49, 49); } .spacefinder--valid:before { content: "valid"; background-color: rgb(34, 150, 49); border: 1px solid rgb(27, 103, 37); } '; | |
$('#spacefinder-css').remove(); | |
$.create('<style id="spacefinder-css">' + css + '</style>') | |
.appendTo(document.head); | |
spacefinder.getParaWithSpace(articleBodyAdverts.getRules(), true); | |
});})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment