Created
November 14, 2012 08:52
-
-
Save quoidautre/4071057 to your computer and use it in GitHub Desktop.
UX: Ligne de flottaison // bookmarklet !!
This file contains hidden or 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
| if ($("#flottaison1").length > 0) { | |
| $("#flottaison1,#flottaison2,#flottaison3,flottaison4").remove(); | |
| $("#text-flottaison1,#text-flottaison2,#text-flottaison3,#text-flottaison4").remove(); | |
| } else { | |
| $('body') | |
| .append('<hr id="flottaison1"/>') | |
| .append('<span id="text-flottaison1">1024x768 (560px)</span>') | |
| .find('#flottaison1') | |
| .css({ | |
| margin:'0', | |
| padding:'0', | |
| display:'block', | |
| position:'absolute', | |
| width:'100%', | |
| left:'0', | |
| top:'570px', | |
| borderColor:'#DC143C' | |
| }) | |
| .end() | |
| .find('#text-flottaison1') | |
| .css({ | |
| display:'block', | |
| position:'absolute', | |
| left:'0', | |
| top:'575px', | |
| fontSize:'11px' | |
| }); | |
| $('body') | |
| .append('<hr id="flottaison2"/>').append('<span id="text-flottaison2">1280x1024 (820px)</span>') | |
| .find('#flottaison2') | |
| .css({ | |
| margin:'0', | |
| padding:'0', | |
| display:'block', | |
| position:'absolute', | |
| width:'100%', | |
| left:'0', | |
| top:'820px', | |
| borderColor:'#006400' | |
| }) | |
| .end() | |
| .find('#text-flottaison2') | |
| .css({ | |
| display:'block', | |
| position:'absolute', | |
| left:'0', | |
| top:'825px', | |
| fontSize:'11px' | |
| }); | |
| $('body') | |
| .append('<hr id="flottaison3"/>').append('<span id="text-flottaison3"> 1600x1080 (880px)</span>') | |
| .find('#flottaison3') | |
| .css({ | |
| margin:'0', | |
| padding:'0', | |
| display:'block', | |
| position:'absolute', | |
| width:'100%', | |
| left:'0', | |
| top:'880px', | |
| borderColor:'#DAA520' | |
| }) | |
| .end() | |
| .find('#text-flottaison3') | |
| .css({ | |
| display:'block', | |
| position:'absolute', | |
| left:'0', | |
| top:'885px', | |
| fontSize:'11px' | |
| }); | |
| $('body') | |
| .append('<hr id="flottaison4"/>').append('<span id="text-flottaison4">1920x1200 (1000px)</span>') | |
| .find('#flottaison4') | |
| .css({ | |
| margin:'0', | |
| padding:'0', | |
| display:'block', | |
| position:'absolute', | |
| width:'100%', | |
| left:'0', | |
| top:'1000px', | |
| borderColor:'#1E90FF' | |
| }) | |
| .end() | |
| .find('#text-flottaison4') | |
| .css({ | |
| display:'block', | |
| position:'absolute', | |
| left:'0', | |
| top:'1005px', | |
| fontSize:'11px' | |
| }); | |
| } | |
| // You must use this : http://benalman.com/code/test/jquery-run-code-bookmarklet/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment